• 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: closing modal window leaves next window inactive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closing modal window leaves next window inactive?


  • Subject: Re: closing modal window leaves next window inactive?
  • From: Keary Suska <email@hidden>
  • Date: Thu, 05 Jul 2007 12:45:06 -0600
  • Thread-topic: closing modal window leaves next window inactive?

on 7/4/07 7:43 PM, email@hidden purportedly said:

>>> I have a controller that loads a window from a nib. It initializes
>>> the window and controls in its -awakeFromNib, then calls [NSApp
>>> runModalForWindow:_window] to run the window modally. When the OK
>>> button is hit, it calls [NSApp abortModal] to terminate the modal
>>> session. The modal window goes away, but the previously (and now
>>> current) frontmost window is inactive. Is that window supposed to
>>> become active automagically, or did I miss something in the setup/
>>> tear down?
>>>
>>> Please no comments about using a sheet window; the window behind mine
>>> doesn't belong to me.
>>
>> What do you mean here--that it doesn't belong to your application?
>> Or are
>> you creating a plugin for some other app? We need to know the context.
>
> Yes, I am creating an application plug-in. When the user clicks on a
> button in the application UI, my plug-in is called to display its
> configuration window. I was previously using a Carbon window loaded
> from a nib, calling RunAppModalLoopForWindow to initiate the modal
> window session and then QuitAppModalLoopForWindow when it was done.
> In the Carbon case, it just worked; with my Cocoa implementation
> everything is working except for the last bit about the app window
> becoming active again.

One thing, make sure you aren't calling -abortModal from within the modal
loop. You should use -stopModal instead.

I had a similar experience, and I don't recall exactly, but I think it had
to do with when -orderOut is called.

Best,

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: 
 >Re: closing modal window leaves next window inactive? (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Drag button within bounds of superview.
  • Next by Date: Re: Zombies don't get enabled
  • Previous by thread: Re: closing modal window leaves next window inactive?
  • Next by thread: Re: closing modal window leaves next window inactive?
  • Index(es):
    • Date
    • Thread