RE: [Plib-devel] listbox and filepicker
Brought to you by:
sjbaker
From: Fay J. F C. AAC/W. <joh...@eg...> - 2000-08-21 14:28:42
|
Sorry about the delay in responding to this; I missed it the first time it came around and just found it in the TODO list. I think the problem in deleting the wrong dialog box comes from the "puPopLiveInterface ()" call in the "puInterface" destructor. I would tentatively fix it by removing the call from the destructor and placing it in the "puDeleteObject" function: if ( ob->getType() | PUCLASS_INTERFACE ) puPopLiveInterface () ; I don't have any applications where dialog boxes create other dialog boxes while destroying themselves so I can't test it out, but a look at the code makes me think it will work. Can someone check it out for me please? I put it into my own application and it doesn't seem to have broken anything. John F. Fay joh...@eg... -----Original Message----- From: Dave McClurg [mailto:Dav...@dy...] Sent: Friday, August 04, 2000 12:52 To: 'pli...@li...' Subject: [Plib-devel] listbox and filepicker i added a listbox and filepicker to pui in the pui example called complex.cxx i hooked the filepicker to the menu/save button one thing i noticed in doing this is that having the callback for one dialog create another dialog and then delete itself via puDeleteObject has problems the reason is that pui maintains an interface *stack* in puInterface.cxx the creation of another dialog precedes the deferred deletion of the old dialog which messes up the stack so when the puInterface destructor calls puPopLiveInterface () ; it is popping the wrong dialog (ie: the new one) and the old one (which was destructed) gets left on the stack. at least this is what i think is happening. what is needed is a better way to handle this because *chaining* from one dialog to another ala linked buttons is pretty common. any suggestions? --Dave |