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

Re: newbie nsdocument question


  • Subject: Re: newbie nsdocument question
  • From: Ian Anderson <email@hidden>
  • Date: Wed, 9 Nov 2005 14:16:20 -0800

You could do something like this, where myWindow is your NSWindow *.

MyDocument *myDoc = [[myWindow windowController] document];

Ian


Hi there.

I have a cocoa document based application. At some point in my app, I need to send a message to MyDocument (that inherits from NSDocument).
How do I get the instance of MyDocument that relates to a window?


I am sorry if the answer is too obvious, but cocoa can be a bit confusing for newbies sometimes...

thank you,
arthur

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: newbie nsdocument question
      • From: Arthur <email@hidden>
References: 
 >newbie nsdocument question (From: Arthur <email@hidden>)

  • Prev by Date: Re: Getting NSXMLDTD to initialize
  • Next by Date: Need help finding memory leak.
  • Previous by thread: newbie nsdocument question
  • Next by thread: Re: newbie nsdocument question
  • Index(es):
    • Date
    • Thread