Re: [Fxruby-users] Dialogues, and create.
Status: Inactive
Brought to you by:
lyle
From: Hugh S. S. E. E. <hg...@dm...> - 2003-07-01 16:40:51
|
On Tue, 1 Jul 2003, Joel VanderWerf wrote: > Hugh Sasse Staff Elec Eng wrote: > > I have learned the heuristic that for a widget hierarchy to be > > operative it must be constructed and created, and the create() calls > > must be done on the child widgets before the parent widget. > > > > So now I have been looking at dialog.rb from the examples. > > application is an FXApp, and application.create is called, but > > FXTestDialog's create method never seems to be called, nor does > > DialogTester's. The child widgets (buttons, menus) don't seem to be > > create()d either. > > Isn't the create() call propagated from parent to child? Then why isn't it always? I have found that I have to call create on the children before the parent, in the few cases I have done this so far. > > In fact, if I add some debugging code to DialogTester#create: > [...] > puts "FOO" [...] > > then I see FOO on stdout when the main window appears. > > I'll bet you could verify that FXTestDialog#create is being called, too. > OK, but how do I use this? I mean, I realise my heuristic was wrong, because the code works, but how do I revise it to fit with reality? :-) Are there whole families of widgets and windows for which I can forget about the create() calls? How do I look this information up? Hugh |