• 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: Instantiating Objects in Nib Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instantiating Objects in Nib Files


  • Subject: Re: Instantiating Objects in Nib Files
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 16 Nov 2003 00:13:36 -0800

On Nov 15, 2003, at 11:52 PM, Dietrich Epp wrote:
Is there any particular reason, then, for trying to instantiate [NSDocumentController] in the nib? Just send messages to it programatically:
[NSDocumentController sharedDocumentController]
(*As far as I can tell*, all the action methods it implements should be handled automatically.)
I wanted to put it in the nib so I could make nib connections to it. Then, when I subclassed it, I wouldn't have to change that part. It's not important.

It's still not clear why you need connections...

And no, the action methods aren't automatic... something has to connect the Save menu command to something. For now I'll just connect it to the first responder.

The Save menu *should* be connected to First Responder -- whichever is the document object for the Main window is the object that should receive the saveDocument: message...

Are you sure you're not confusing NSDocumentController and NSDocument?

mmalc
_______________________________________________
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: Instantiating Objects in Nib Files
      • From: Dietrich Epp <email@hidden>
    • Re: Instantiating Objects in Nib Files
      • From: mmalcolm crawford <email@hidden>
References: 
 >Instantiating Objects in Nib Files (From: Dietrich Epp <email@hidden>)
 >Re: Instantiating Objects in Nib Files (From: Shaun Wexler <email@hidden>)
 >Re: Instantiating Objects in Nib Files (From: Dietrich Epp <email@hidden>)
 >Re: Instantiating Objects in Nib Files (From: mmalcolm crawford <email@hidden>)
 >Re: Instantiating Objects in Nib Files (From: Dietrich Epp <email@hidden>)

  • Prev by Date: Sending keyboard events
  • Next by Date: Re: NSTextField getting input number by number
  • Previous by thread: Re: Instantiating Objects in Nib Files
  • Next by thread: Re: Instantiating Objects in Nib Files
  • Index(es):
    • Date
    • Thread