• 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: Being notified of current document change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Being notified of current document change


  • Subject: Re: Being notified of current document change
  • From: Graham Cox <email@hidden>
  • Date: Tue, 8 Jul 2008 01:56:49 +1000

I'm not sure if there is a better way, but subscribing to NSWindow didBecomeMain/didResignMain, then using:

NSDocument* cd = [[NSDocumentController sharedDocumentController] currentDocument];

is one way to do it.

hth,


Graham


On 8 Jul 2008, at 1:14 am, Laurent Cerveau wrote:

Hi

This is probably a stupid question but : in a NSDocument application I did not found a way to be notified of change of currentDocument. For now I do some tricks with notification on window but I was wondering if I simply missed a part?

Thanks

laurent
_______________________________________________

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: 
 >Being notified of current document change (From: Laurent Cerveau <email@hidden>)

  • Prev by Date: Re: NSURLConnection how to handle 502 error
  • Next by Date: Re: Efficiently receiving data from an NSTask
  • Previous by thread: Being notified of current document change
  • Next by thread: Re: NSSpeechSynthesizer and empty strings
  • Index(es):
    • Date
    • Thread