I need to bring a window up that is modal for the application (i.e. you can not make other windows active, and you can not use menus while this window is up). However after bringing the modal window up I want control returned to the main runloop, not a modal runloop.
If I use runModalForWindow: it creates a modal event loop that will not return until I call endModal. This blocks other code execution, it will not return control to the application while the modal dialog is up. If I use ... - (void)beginSheet:(NSWindow *)sheet modalForWindow:(NSWindow *)docWindow modalDelegate:(id)modalDelegatedidEndSelector:(SEL)didEndSelector contextInfo:(void *)contextInfo This is closer to the behavior that I want. The window that the sheet is modal for will not process events, but the main runloop appears to continue. However other windows can be activated, and I do not want that. I have been looking at applying different modes to the main runloop. It looks like it might be a way to achieve what I want to do. I'm not entirely clear on how this works. Some ideas on this might be helpful. The reason I want to do it this way is because I'm modifying a Carbon application with a lot of legacy code. The current code base does it this way and changing that would require some significant refactoring. Thank you for the help. -dave _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com