RE: [Fxruby-users] How to show stuff created at run time (not the easy question)
Status: Inactive
Brought to you by:
lyle
From: Will M. <wi...@co...> - 2003-12-10 01:27:30
|
Lyle Johnson wrote: > Have not tried running your sample code yet, Don't bother, I did not include the code that calls this. > but see what happens if you replace the > calls to resize() with a call to recalc(): > > @inspectordlg.recalc There it is, that works. That is the function that I was looking for, but with www.fifthplanet.net down I could not find it. Thank you. > I see another potential problem with the code, > which is that every call to ObjectInspector#set > adds a new FXMatrix widget to the dialog box > (@inspectordlg). Unless I'm just misreading > things, I suspect that you'll want to first > remove the old matrix first, i.e. > > # Out with the old... > @propertyFrame.removeChild(@matrix) Yes, I was fairly sure that I had a problem with that, and no you weren't misreading things. The ObjectInspector#clear method was intended for just that purpose, but I had not been able to figure out what to put in it. (that www.fifthplanet.net down thing again.) removeChild is obviously correct. Now, does the @propertyFrame.removeChild(@matrix) call also clean up all of the elements contained in @matrix, or do I also need to clear them out? Further, how does Ruby's garbage collection play into this? What gets automatically cleaned up, and what do I need to explicityl clean up? > Hope this helps, > > Lyle Yes it does, and thank you for the timly response. --Will |