• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument


  • Subject: Re: NSDocument
  • From: Matt Neuburg <email@hidden>
  • Date: Thu, 14 Jan 2010 12:53:36 -0800
  • Thread-topic: NSDocument

On Thu, 14 Jan 2010 12:57:57 -0700, David Blanton <email@hidden>
said:
>When my document based app starts up the awakeFromNib method in my
>NSDocument subclass is called.
>
>When I choose Open a new NSDocument is instanced but this does not
>call awakeFromNib.
>
>Am I missing a setting?
>
>I need awakeFromNib to be called for any instance on my NSDocument
>sublass.
>
>I am in dire straits on this on,  any help ...appreciated.

In a standard doc-based app, there is no NSDocument instance in the nib. So
naturally no NSDocument instance ever awakes from a nib. So naturally
awakeFromNib is never called. The fact that your NSDocument subclass's
awakeFromNib is *ever* called suggests that you have already done something
very odd.

Of course I could just be confused, but it sounds to me like you might be
asking the wrong question. Is the question how to perform initializations as
a document is opened? The Document-Based Applications Overview contains a
discussion of this question.

m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings



_______________________________________________

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

  • Follow-Ups:
    • Re: NSDocument
      • From: David Blanton <email@hidden>
  • Prev by Date: Re: Trying to create an alias file by using the new NSURL methods available with Mac OS X 10.6 !
  • Next by Date: Re: NSDocument
  • Previous by thread: Re: NSDocument
  • Next by thread: Re: NSDocument
  • Index(es):
    • Date
    • Thread