Re: Heads Up - Modeless dialogs coming.


Subject: Re: Heads Up - Modeless dialogs coming.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed May 17 2000 - 09:00:27 CDT


On Wed, 17 May 2000, Martin Sevior wrote:

>
> I'm still tracking down a seg fault that occurs after closing an open
> view with insert symbol running. It is pretty strange. I'm finding
> situations where the getFrameCount() method in xap_App returns 0 frames
> even though there are clearly open frames running.
>
> Look at the code in src/af/util/unix/ut_dialoghelper.cpp
>
> at the
>
> focus_in_event_Modeless
>

I've fixed the bug. It was caused by the fact that I used to pass a frame
pointer into focus_in_event_Modeless and extracted a pointer to xap_App.
This frame can then be closed while leaving the modeless dialog
running.

The fix was to simply pass a pointer to xap_App directly into
focus_in_event_Modeless. This alters the calling routine connectfocusModeless
slightly. This routine should be placed in every modeless dialog to
show which frame is connected to the dialog. The caret shows up only in
the connected frame.

If you've made it to here, the bottom line is that I can no longer crash
abi with "Insert Symbol" no matter what I do. Moreover it appears to
always tell me which frame is connected to the dialog and puts the
symbol into the place it tells me its going. I'm happy. I've stubbed
the new virtual methods "destroy" and "runModeless" for qnx,beos and
Mac. For win I renamed "runmodal" to "runmodeless" and stubbed runmodal
(just like unix).

Hopefully hese platforms will compile but will no doubt need some work.
The first step is to generalize hj's "focus fix" to handle non-modal
dialogs
for your platform.

I've implemented a new class "XAP_Dialog_Modeless" which is derived from
"XAP_Dialog_AppPersistent" with much of the xp stuff within it directly
and available to all modeless dialogs. It might be possible to move a
little bit more stuff from platform specific into "XAP_Dialog_Modeless".

I've learnt a lot more about C++ doing this!
 
Anyway if there are no complaints I will commit this code in about 11
hours from now.

Cheers

Martin



This archive was generated by hypermail 2b25 : Wed May 17 2000 - 09:00:55 CDT