• 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: NSWindowDidBecomeMainNotification firing twice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowDidBecomeMainNotification firing twice?


  • Subject: Re: NSWindowDidBecomeMainNotification firing twice?
  • From: James McConnell <email@hidden>
  • Date: Sun, 07 Mar 2004 15:14:20 -0600

On 3/7/04 2:41 PM, "Allan Odgaard" <email@hidden> wrote:

> On 7. Mar 2004, at 20:03, James McConnell wrote:
>
>> In my application, I have a need to track which document is currently
>> the "main" document. I have set up the correct notifications and it
>> seems to be firing twice.
>>
>> This is the code I have in - (void)awakeFromNib: in MyDocument
>
> Each new document will cause the Nib to be loaded (to create a new
> instance), so you'll add a new notification each time.
>

Where should I put the code for the notification? I originally had it in
init:, and it did the same thing, firing a notification for each window
instance, not just the active one. What am I missing here?

James
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSWindowDidBecomeMainNotification firing twice?
      • From: Allan Odgaard <email@hidden>
References: 
 >Re: NSWindowDidBecomeMainNotification firing twice? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: [BUG?] initialFirstResponder killed by Panther?
  • Next by Date: Re: Using NSView as a template
  • Previous by thread: Re: NSWindowDidBecomeMainNotification firing twice?
  • Next by thread: Re: NSWindowDidBecomeMainNotification firing twice?
  • Index(es):
    • Date
    • Thread