Re: [ANNOUNCE] Tk::Gripes and Tk::SignalSlot

Nick Ing-Simmons <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Ala Qumsieh <[email protected]> writes:
>Tk::Gripes is not a module, but rather the (hopefully)
>first in a series of articles that outline things I do
>not like about Tk. These articles can address
>anything, ranging from syntax, to functionality, to
>appearance.
>
>The first such article addresses Tk's binding
>mechanism, Tk::bind. It can be found on PerlTk.org:
>
>http://www.perltk.org/index.php?option=com_content&task=view&id=49&Itemid=28
>
>Briefly, Tk::bind only allows a single callback to be
>bound to an event, which is an unnecessary
>restriction, and can add a lot of confusion and
>complexity to maintaing a large code base, especially
>for programs that require a lot of user interaction.

Well :
   A. There is nothing stopping that callback calling others.
   B. It isn't true
        bind associates a callback with a tag 
        when an event occurs Tk calls the callbacks - in sequence 
        - for all the bindtags associate with the widget via bindtags.

So if you are writing a mega-widget you should bind to the class name
of that implements it. And leave the specific instance name tag for 
end-user use.

There is even a mechanism for a derived class to inherit bindings 
from its base class(es)!


  




>
>Tk::SignalSlot is a module that attempts to offer a
>cleaner, and more modular alternative to Tk::bind. It
>is loosely based on, and borrows its nomenclature
>from, Qt's signal/slot mechanism. Essentially, it
>allows you to connect() any number of callbacks to a
>specific event. You can them disconnect() connected
>callbacks very easily without affecting anything else,
>resulting in simpler, more maintainable code.
>
>Tk::SignalSlot is making its way to a CPAN mirror near
>you. In a couple of hours, you should be able to
>access it here:
>
> http://search.cpan.org/~aqumsieh/Tk-SignalSlot-0.1/
>
>Comments welcome.
>--Ala
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>-++**==--++**==--++**==--++**==--++**==--++**==--++**==
>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]


-++**==--++**==--++**==--++**==--++**==--++**==--++**==
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.