Re: [Tutor] tkinter events:

2006-09-02 Thread Alan Gauld
> Well, I considered encapsulation as syntactical sugar. > And even prolog knows polymorphism, but I wouldn't call it OOP. Humor acknowledged, but... Encapsulation can be syntactic sugar - and often is. But the concept that it sugar coats is real enough. You can write OOP by convention using lang

Re: [Tutor] tkinter events:

2006-09-02 Thread Zsíros Levente
Well, I considered encapsulation as syntactical sugar. And even prolog knows polymorphism, but I wouldn't call it OOP. (Yes, I know in a typless context polymorphism doesn't mean too much. And btw, if Python is a multi-paradigm language why doesn't support polygamy? :) ) Or maybe I'm wrong ...

Re: [Tutor] tkinter events:

2006-08-28 Thread Alan Gauld
I just found this message (because Mike posted the tinyurl) and couldn't resist responding... "Zsiros Levente" <[EMAIL PROTECTED]> wrote > If we're talking about data hiding, let me ask: why Python doesn't > implement data hiding (I mean 'private' and 'protected')? I consider > it > a very im

Re: [Tutor] tkinter events:

2006-08-28 Thread Mike Hansen
Yep...across multiple lines. Here's a tinyurl of it http://tinyurl.com/n93au Mike > -Original Message- > From: Zsiros Levente [mailto:[EMAIL PROTECTED] > Sent: Friday, August 25, 2006 11:37 PM > To: Mike Hansen > Cc: python tutor > Subject: Re: [Tutor] tkinter

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
So, in the following line self.can.bind("",lambda x:self.handler(x,'release')) the event-handler will call handler(event, 'release') when the mousebutton is released, but the 'self' reference is automatically passed over, so the result will be the handler(self,event, 'release') call. Correct m

Re: [Tutor] tkinter events:

2006-08-25 Thread Zsiros Levente
The link is broken. Mike Hansen wrote: > > > > >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente >>Sent: Thursday, August 24, 2006 2:21 PM >>To: Danny Yoo >>Cc: python tutor >&

Re: [Tutor] tkinter events:

2006-08-24 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente > Sent: Thursday, August 24, 2006 2:21 PM > To: Danny Yoo > Cc: python tutor > Subject: Re: [Tutor] tkinter events: > > If we're talking about dat

Re: [Tutor] tkinter events:

2006-08-24 Thread Zsiros Levente
If we're talking about data hiding, let me ask: why Python doesn't implement data hiding (I mean 'private' and 'protected')? I consider it a very important OOP feature, because that makes OOP different from structural programming. Danny Yoo wrote: >> def handler(event): >> if buttonpressed

Re: [Tutor] tkinter events:

2006-08-22 Thread Danny Yoo
> def handler(event): > if buttonpressed == 1 : > /#if the mousebutton is pressed and moved, circles should > appear, but they do not/ > can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r, > fill="orange") > lab.config(text='buttonpressed=' + str(bu

Re: [Tutor] tkinter events:

2006-08-22 Thread Zsiros Levente
Zsiros Levente wrote: >Luke Paireepinart wrote: > > > >>Zsiros Levente wrote: >> >> >> >>>[snip code] >>>*def* handler(event): >>>*if* buttonpressed == 1 : >>>/#if the mousebutton is pressed and moved, circles should >>>appear, but they do not/ >>>can.create_oval(event.x

Re: [Tutor] tkinter events:

2006-08-22 Thread Zsiros Levente
You're right, that I pressed reply instead of reply-to-all, so the list didn't see my response. But this way you got my mail twice. Isn't that annoying? Other maillist servers used to use the reply-to tag in the message header. Luke Paireepinart wrote: > Zsiros Levente wrote: > >> [snip code]

Re: [Tutor] tkinter events:

2006-08-22 Thread Zsiros Levente
Luke Paireepinart wrote: > Zsiros Levente wrote: > >> [snip code] >> *def* handler(event): >> *if* buttonpressed == 1 : >> /#if the mousebutton is pressed and moved, circles should >> appear, but they do not/ >> can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r, >> f

Re: [Tutor] tkinter events:

2006-08-21 Thread Luke Paireepinart
Zsiros Levente wrote: [snip code] *def* handler(event): *if* buttonpressed == 1 : /#if the mousebutton is pressed and moved, circles should appear, but they do not/ can.create_oval(event.x-r, event.y-r, event.x+r, event.y+r, fill="orange") lab.con

[Tutor] tkinter events:

2006-08-21 Thread Zsiros Levente
  #!/usr/bin/python # In this program I wanted to write the event on my own, combining , and , # but unfortunetly it doesn't work. No syntax errors.  from Tkinter import * def handler(event): if buttonpressed == 1 : #if the mousebutton is pressed and moved, circles should appear, but