Re: (fwd) Re: (fwd) binding to a derived canvas widget

Steve Lidie <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
On Mar 31, 2006, at 3:55 PM, Steve Lidie wrote:

>
>
>> From: Ch Lamprecht <[email protected]>
>> Newsgroups: comp.lang.perl.tk
>> Subject: Re: (fwd) binding to a derived canvas widget
>> Date: Fri, 31 Mar 2006 10:39:05 +0200
>>
>> Hi,
>>
>> did you think of something like this?
>>
>> sub ClassInit
>> {
>>      my ($class, $mw) = @_;
>>      $class->SUPER::ClassInit($mw);
>>      $mw->bind($class, "<1>" =>'pick_one' );
>>      return $class;
>> }

Opps, sorry, I missed you were binding to the class, yes, this will  
work. OF course, if the class already had a B1 binding it gets  
clobbered. It all depends on how you want your class to behave. This  
way overrides any B1 binding, using bindtags allows you to share.


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.