[Memphis.pm] GTK-Perl and signal handlers

Big Ed dysan_2000 at hotmail.com
Tue May 9 23:18:19 CDT 2000


Well.. I've only used GTK+ Widgets in C, but I think I can help you here:

With the other widgets, create signal handlers with express purpose of 
updating a standalone struct with the necessary info.  When your signal 
function is called on the button, reference the struct for retrieving 
necessary data from it.  You could do the same with a class or something of 
that nature ($obj->set_text('blah'))  I really need to look back into a 
little GTK stuff, since it's been months since I've done any GTK coding 
lately.  Also, the signal handlers do allow for passing additional args into 
the call.  You should be able to pass a $ref off.

If this doesn't seem correct, or you want me to post an example, let me 
know.

-Ed

>From: "Phil Groce" <phil_groce at cmcsmart.com>
>Reply-To: memphis-pm-list at pm.org
>To: memphis-pm-list at pm.org
>Subject: [Memphis.pm] GTK-Perl and signal handlers
>Date: Tue, 09 May 2000 16:27:29 -0500
>
>(Should I post to GOLUM or the Perl Mongers? Hmm...Perl Mongers could use
>the traffic....)
>
>I'm building a little UI for the venerable "read directory of files, do a
>substitution, write file to different directory" script.
>
>I'm having trouble finding info on the signal handlers, though. When a
>button gets pressed, I'd like to be able to get some info from the rest of
>the UI (source directory, destination directory, regular expression) and
>feed that to the useful part of the program. It looks like my signal
>handler gets passed a reference to the button, then an empty string(?), the
>name of the button as a string, and the window name, again as a string.
>
>How can I get a ref to the top-level ancestor of the widget, so I can visit
>the important parts of the UI and grab my info?
>
>Possibly significant detail: I'm using Glade to build the UI.
>
>Any help on this would be appreciated.
>
>phil
>
>----------------------------------------------------------------------------
>To unsubscribe, please send email to majordomo at pm.org
>with 'unsubscribe memphis-pm-list' in the body of the message.
>----------------------------------------------------------------------------
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

----------------------------------------------------------------------------
To unsubscribe, please send email to majordomo at pm.org
with 'unsubscribe memphis-pm-list' in the body of the message.
----------------------------------------------------------------------------




More information about the Memphis-pm mailing list