• 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: does transformedValueClass matter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does transformedValueClass matter?


  • Subject: Re: does transformedValueClass matter?
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 3 Mar 2006 00:59:31 -0500


On Mar 3, 2006, at 12:46 AM, Matt Neuburg wrote:

On or about 3/2/06 9:30 PM, thus spake "Scott Anguish" <email@hidden>:


On Mar 2, 2006, at 11:29 PM, Matt Neuburg wrote:

Like Tom Harrington in this thread...

<http://www.cocoabuilder.com/archive/message/cocoa/ 2005/11/23/150949>

...I find the documentation on NSValueTransformer's
+transformedValueClass
bizarre. We are declaring a class, but what class? It is perfectly
legal for
a reversible transformation to transform a class A object into a
class B
object and (reversing) a class B object into a class A object, so
which
should I return from transformedValueClass - A or B?


there is a bug in the current doc (which has been fixed already) that says that the transformedValueClass is used in both the 'forward' and reverse transformations.. it is actually only used in the 'forward' one.

Okay. Tell me more. In the "forward" one, does it represent the class that
transformedValue expects (as input) or the class that it produces (as
output)?


	right, it's the class that the transformedValue will be.

Because I would think from the docs that it would be the output,
but the CLStringNumberValueTransformerexample here:

<http://www.cocoalab.com/developer/classes/valuetransformers.htm>
<http://www.cocoalab.com/developer/classes/ CLValueTransformers.zip.bin>

Well, that example isn't from Apple (I can't seem to download it, the file is not found)



...has it the other way around. Yet the example does not break. Meanwhile,
the examples in Examples use NSObject, which is as non-committal as you can
get.


it is useful information to the runtime

But not useful enough as to affect the functionality of the transformer? m.

I believe that is the case. I think it's used by IB. But I haven't check explicitly.


_______________________________________________
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: does transformedValueClass matter? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Eval() ?
  • Next by Date: Re: NSXMLDocument question
  • Previous by thread: Re: does transformedValueClass matter?
  • Next by thread: How to Create the New Print Panel Similar to that of Preview Application
  • Index(es):
    • Date
    • Thread