• 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: Access instance var from NSValueTransformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access instance var from NSValueTransformer


  • Subject: Re: Access instance var from NSValueTransformer
  • From: mmalcolm crawford <email@hidden>
  • Date: Mon, 15 Nov 2004 17:42:13 -0800


On Nov 15, 2004, at 4:45 PM, Todd Freese wrote:

I think so.  *If* I follow correctly, then, you could simply create a
subclass of NSArrayController that has an ivar for the document.  Then
override -newObject:
I think so. I am a little green around the ears in terms of Cocoa: :-)
Can you clarify a little on "has an ivar for the document"? I understand
subclassing NSArrayController and overriding -newObject, just not sure how
to set the new ivar for the document.


Oh sorry, you could either create an outlet for the document and connect it directly in IB, or (assuming ivar 'document' and standard accessors) you could send a setDocument: message from your document object (File's Owner) in awakeFromNib or windowControllerDidLoad:.

For an analogous situation see the Graphics Bindings example mentioned earlier.

Does that make sense?

mmalc
_______________________________________________
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


References: 
 >Re: Access instance var from NSValueTransformer (From: Todd Freese <email@hidden>)

  • Prev by Date: [Proposal] On-the-fly NIB localization
  • Next by Date: Custom NSToolbarItem
  • Previous by thread: Re: Access instance var from NSValueTransformer
  • Next by thread: Re: Access instance var from NSValueTransformer
  • Index(es):
    • Date
    • Thread