Re: [Fxruby-users] Dialogues, and create.
Status: Inactive
Brought to you by:
lyle
From: Hugh S. S. E. E. <hg...@dm...> - 2003-07-03 15:45:31
|
On Thu, 3 Jul 2003, Lyle Johnson wrote: > Hugh Sasse Staff Elec Eng wrote: > > > When would you want to do [detach], then? > > Please see the FAQ "What's the difference between detach and delete?": > > http://www.fox-toolkit.org/faq.html#DETACH Thanks, I'll do that. > > > So you can call create on the FXObject to get it back again if you > > wish? Is this common practice to reduce memory usage whilst keeping > > performance high, or something? I'm thinking in my current [...] > Yes, you can call create on the object to get it back again, but no, it > isn't common practice to create and tear down windows to reduce memory > use. I cannot think of a single time when I have called destroy() [...] So these GUIs are pretty efficient then. So do people tend to just use show and hide then, and just let normal garbage collection take its course? Maybe the effort isn't worth it now, and I should forget habits about tight memory budgets picked up in the 1980's! [...] > need to display a GUI. For example, maybe at first it does display a GUI > and allow the user to interact, set some parameters. At some point, the > user clicks the "Go" button and we call FXApp#destroy to tear down all > of the GUI parts, so that the program can continue to run in the > background even if the X server is killed or something like that. Again, > I've never needed to do this, so I'm just going from memory here. Thanks, that is an interesting idea. > [...] > >> anIcon = FXPNGIcon.new(getApp(), ...) > > > > Ah, just "clicked" about getApp(), avoids repeoting a ref to the > > application object. getApp doesn't seem to appear in the methods > > pane of http://www.fxruby.org/doc/api/ > > It *is* listed as a "readable" attribute of FXId: Oh! it's one of those! :-) > value. But that's a separate discussion, whether we should be listing > both the "getter" and "setter" methods as well as the "attr_reader" and > "attr_writer" methods in the API docs ;) yes, this may really fall into the "who is RDoc's audience?" area: -- I was feeling frustrated earlier trying to find out where show() came from, because it is used by FXDialogueBox, but comes from FXTopWindow, but FXTopWindow.methods doesn't reveal it, only FXTopWindow.instance_methods does. I'm beginning to think that there maybe needs to ba another template for RDoc for behaviour discovery. This leads into the dark and twisty passages about respond_to?() being insufficient to specify type because it doesn't cover semantics. So I can't think about adding this to Rdoc myeslf when it is probably not the solution. > > -- Lyle > > Hugh |