• 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
Style Question: accessing methods in the Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Style Question: accessing methods in the Document


  • Subject: Style Question: accessing methods in the Document
  • From: Shawn Seet <email@hidden>
  • Date: Thu, 1 Jun 2006 09:50:00 +1000

Hi All
I have a project which is document based and I need my custom views to be able to access some methods in my document object. I am doing this successfully using


[[[[NSApp keyWindow] windowController] document] methodName];

or

[[[[self window] windowController] document] methodName];

A couple of things tell me this is poor practice. I get a warning at compilation that no method "methodName" was found. And this technique fails if there is a parameter involved.
Please excuse the basic nature of this question. I'm new to this. And I've looked through documentation but I feel that this might be something so obvious (to you all) that it isn't documented.
Thank you in advance.


Shawn Seet
_______________________________________________
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: Style Question: accessing methods in the Document
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: NSTableView bindings assumptions
  • Next by Date: Re: Style Question: accessing methods in the Document
  • Previous by thread: Re: NSTableView bindings assumptions
  • Next by thread: Re: Style Question: accessing methods in the Document
  • Index(es):
    • Date
    • Thread