Re: Finding which window hierarchy I'm in



muppet wrote:

On Saturday, September 20, 2003, at 08:17 PM, Dan Lyke wrote:

What's the better solution?


for very subjective values of "better"....

what i usually do is use a structure (or indeed an object) for each high-level object like a window; i store a pointer to each interesting widget in that toplevel object, and pass that object as user data to all the signals for those interesting widgets. with this scheme you always get the right thing and there's no problems like what you're having.

i have no idea how to do that with glade. perhaps $gladexml->signal_connect_data ?

In the Glade editor, on the page where you edit signals, there is an entry for the user_data argument. I think you just give it the variable name and make sure you declare it and whatnot in C.. probably the same in perl, I've never used it though.

--
muppet <scott at asofyet dot org>

James





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]