• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem in coming out of modal run loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem in coming out of modal run loop


  • Subject: Re: Problem in coming out of modal run loop
  • From: Keary Suska <email@hidden>
  • Date: Mon, 25 Jul 2011 15:09:37 -0600

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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Problem in coming out of modal run loop (From: Abhijeet Singh <email@hidden>)

  • Prev by Date: Re: can't build iPhone apps, certificate error
  • Next by Date: Re: Windows get released on 10.6, leak on 10.7
  • Previous by thread: Problem in coming out of modal run loop
  • Next by thread: Lion NSSpeechSynthesizer leak?
  • Index(es):
    • Date
    • Thread