• 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: -[NSDocument fileURL] is observable (KVO). Documented?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSDocument fileURL] is observable (KVO). Documented?


  • Subject: Re: -[NSDocument fileURL] is observable (KVO). Documented?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 1 Jun 2010 15:34:06 -0700

On Jun 1, 2010, at 15:25, Jerry Krinock wrote:

> Yuck.  Unless someone knows a better way, that means setting up either a kqueue or FSEvents thingy for the document to watch its own path.  Does anyone know an easier way?  Because of the way that a document window's title changes instantly when its file is moved in Finder, apparently Apple has this already built in to NSDocument.  Does anyone know how to hook into that, ahead of setFileURL:?

A bit of lateral thinking:

Take a look at -[NSWindowController windowTitleForDocumentDisplayName:]. However the document chooses to manage its URL, it seems likely that this method is going to be called whenever it does change. You could use this invocation as a signal that your code should go check the URL.


_______________________________________________

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: 
 >-[NSDocument fileURL] is observable (KVO). Documented? (From: Jerry Krinock <email@hidden>)
 >Re: -[NSDocument fileURL] is observable (KVO). Documented? (From: Mike Abdullah <email@hidden>)
 >Re: -[NSDocument fileURL] is observable (KVO). Documented? (From: Kyle Sluder <email@hidden>)
 >Re: -[NSDocument fileURL] is observable (KVO). Documented? (From: Mike Abdullah <email@hidden>)
 >Re: -[NSDocument fileURL] is observable (KVO). Documented? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: -[NSDocument fileURL] is observable (KVO). Documented?
  • Next by Date: Re: I need float resolution bitmap data from a JPG using CIImage or similar helper
  • Previous by thread: Re: -[NSDocument fileURL] is observable (KVO). Documented?
  • Next by thread: Re: -[NSDocument fileURL] is observable (KVO). Documented?
  • Index(es):
    • Date
    • Thread