On Jul 25, 2011, at 6:01 AM, Abhijeet Singh wrote: > Hi,I am opening a NSPanel as a modal window using runModalForWindow > method.The problem is when i close the panel the modal run loop is not > stopped. I have tried all the possible ways ( stopModalWithCode, stopModal, > abortModal). But nothing works. I have number of modal windows in my > applications but all other windows work fine. Infact I am opening this > NSPanel from inside one of the modal window (is this a problem ?). Please > suggest a solution...Thanks and RegardsAbhijeetDear cocoadev ! Get Yourself a > cool, short @in.com Email ID now!
Calling -runModalForWindow within a modal session is usually not what you want--Cocoa doesn't "stack" modal sessions per se and some behavior may be undefined. That being said, when are you trying to stop the modal session? In -windowShouldClose? That's probably the best case for your implementation, but I would also add that modal windows generally shouldn't have close boxes and should have a cancel/OK button approach instead. Back in the game, Keary Suska Esoteritech, Inc. "Demystifying technology for your home or business" _______________________________________________ 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