[Glade-users] on_realize() not being called

On 10/26/05, Damon Chaplin <damon karuna uklinux net> wrote:

On Wed, 2005-10-26 at 15:13 -0400, Jeff Simpson wrote:
I've seen this a few times before, but haven't found an answer
anywhere on the web or in the mailinglist archives.

I have a window that I created in glade, compiles, works great. I
cannot for the life of me get the on_realize() signal to work for the
window. Likewise, I can't get ANY signal that seems like it would
correspond to the window loading (on_show, etc). I just need someplace
to do the things that I would do in a constructor if I had one. At the
moment I have a button that you have to press when you start the
program, and I really don't like the idea that initialization of
dynamic classes and such aren't done until they click that button. Any
suggestions on getting on_realize() to work or a replacement? Thanks!

Why don't you just add the code after the call to create_windowX()?
I don't see the need for a callback to do initialization.

I needed the callback so that it would be a member function of the class
that the window created. I suppose I could also have it call that function
from outside the class as easily.

Where is create_windowX()? I should have specified that I am using C++ with
glademm/gtkmm, etc for code generation.

In another case, I want to load default values into a configuration dialog
box every time show() is called. I'd like to have that be done from a
callback in the dialog, but again, I suppose it is possible to call it from
the same place where winConfig->show() is being called.

I just don't see why these handlers don't work when they seem like they
should be. It's not that I couldn't find a way to work around them, it would
just be a lot more elegant if I could use them when I need to.

I just tried adding a "realize" handler and it worked fine. "map" works
as well. Are you sure you added the signal? (The Glade interface is a
bit confusing for that. Look in the XML file to check.)

Fairly certain I added the handler. I have a lot of other handlers (button
presses, etc) and they work fine, all
added in the same way. Glade did add code to my files, including a stub
on_realize() function. I added a bit of a hello world in there, and it
doesn't ever get called.

- Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20051026/38515dcd/attachment.html

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