Hi all.

In our client-server app we sometimes present modal sheets on our main window. 
Following server notifications we sometimes have to dismiss these sheets (user 
is expelled, or otherwise status-changed).

We do this using the [mainWindow attachedSheet] endSheet];

However, If we do this while the user holds one of the sheet buttons pressed 
--- within the mouse-tracking loop --- than endSheet happens, and then the 
mouseUp event reaches a released object (the sheet) which then crashes the 
application.

All this happens in the main thread of the application, and it seems that the 
modal-event-loop of the sheet does not block network-born events. We have 
plenty of different sheets, so I prefer not to tailor each one, but rather have 
a general fix.

Is there a "right way" to go about this? somehow clear the event queue, or 
close the mouse-tracking loop when I need to end the sheet programmatically? 
somehow handle the mouse-up in an appropriate way? maybe my whole approach is 
wrong here?

Any insight will be appreciated --- Thanks.

Motti Shneor
Spectrum Reflections Ltd.
---
Ceterum censeo Microsoftinem delendam esse



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to