NSData, NSImageView value binding, and NSUnarchiveFromData - nothing appears
NSData, NSImageView value binding, and NSUnarchiveFromData - nothing appears
- Subject: NSData, NSImageView value binding, and NSUnarchiveFromData - nothing appears
- From: Matt DeLuco <email@hidden>
- Date: Sat, 05 Jan 2013 21:39:08 -0500
When I started building my app I had been using NSImageView's Data binding to display image data in an NSData object, which is apparently deprecated.
I read that a data transformer has to be used when using the NSImageView's Value binding. After digging around I realized that there's an NSUnarchiveFromData value transformer available. As far as I can tell, that should be sufficient to transform the bound NSData object into an NSImage suitable for the NSImageView.
However, it doesn't seem to be working - nothing appears in the NSImageView in the UI. Using the same model key path in the NSImageView value binding works (but again, is deprecated.)
What could I be missing? Is it that the NSUnarchiveFromData value transformer (as selected in XCode/IB under the NSImageView's value binding) is inappropriate; should I be coding my own value transformer?
Note that I'm not using Core Data (upon which an overwhelming majority of value transformer docs seem to focus on.) I'm working with nested NSDictionary structures.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden