• 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: Sun, 14 Nov 2004 13:06:39 -0800


On Nov 14, 2004, at 12:28 PM, Todd Freese wrote:

In my reverseTransformedValue method for an NSValueTransformer, I need to access an instance variable. This is because the object I need to return needs to have it’s state set correctly based on the type of document. (This is a doc-style app)
[...]
In this example, 29.97 and YES are hard coded. I need to retrieve these values from an instance var for MyDocument.


You can't, value transformers are not set up to do this.

There are a couple of "workarounds"; which one you choose will depend on what work you are prepared to do...

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: 
 >Access instance var from NSValueTransformer (From: Todd Freese <email@hidden>)

  • Prev by Date: Re: Possible to copy bundle's framework to file system?
  • Next by Date: NSTextField/View and shadows
  • Previous by thread: Access instance var from NSValueTransformer
  • Next by thread: Re: Access instance var from NSValueTransformer
  • Index(es):
    • Date
    • Thread