RE: [Plib-users] RE: Crash while deleting puDialogBox... access violation
Brought to you by:
sjbaker
From: SkyFlash <sky...@ch...> - 2003-04-02 05:45:27
|
> What I found was that the puMouse(button, state, x, y) > callback was arriving after dialog was deleted !? Yes, thats the same I am seeing, and I dont know why. > I'm not sure if it was a timing issue in my code, or a bug in > the pui ... where maybe it doesn't correctly check if the > dialog exists when checking hits (if I remember correctly it > seemed to happen on the mouse up event). I am certain its a bug in PUI or a real bad design decision. I wasnt able to delete the dialogbox in the callback, whatever I tried. But then, where else should I delete it if not in the callback? > In my case *maybe* it was a timing issue (but I'm not > convinced yet) ... I changed my code as follows to delete the > dialog after an intensive load operation (and a redraw ... > maybe the redraw is the solution ... I'm just guessing here): The redraw doesnt help for me.... my problem is that its only a noticebox, so there is no time being used in between, but anyway having the app rely on a fulfilled race condition is really bad anyway. > Sorry I can't be more helpful than that. Let us know what you find. Still didnt get it to work... I think someone who REALLY knows (like the developer who wrote it :P) needs to tell us what its doing and why... they should know... Searching through the code didnt help me at all, whatever its doing must be hidden somewhere. > >Do I need to tell PUI I am deleting that dialogbox AND the buttons > >inside it?? Clean something up? Pop some interface from the stack?? > > No, I don't think so. I was trying to pop the dialogbox from the stack but it still gets the mouse event and crashes. I dont know what else I can do to persuade PUI that I REALLY deleted it. :P It doesnt say anywhere in the docs how the deletion works, but somehow the example apps seem to work... really weird. Ralf Pietersz |