On Dec 14, 2008, at 09:59, Keith Lander wrote:

I am fairly new to Cocoa (but not programming). I have a data model containing an entity with a String attribute representing a path to a folder. I am trying to use IB to bind an NSPathControl widget to the attribute in the window controller. I assume I need a value transformer to convert NSURL to String and back. I have written a crude one to do this, but it fails. In IB I have set the content path to the attribute name and the value transformer to the name of the transformer class. When I run the app the transformer is called during initialisation, but the value passed is an instance of NSCVString, which makes no sense to me.

The value transformer is on the path control binding? Then it makes sense that your transformer should be invoked to transform a string to a url. (That is, the forward direction of the transformer goes from model class to interface class.) Are you expecting the reverse direction?


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to