NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
- Subject: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
- From: George Orthwein <email@hidden>
- Date: Fri, 5 May 2006 11:33:16 -0400
I'm trying to bind the path/url of an NSImageView to an NSString
attribute in my Core Data store. I'd like the image path saved so
that the NSImageView displays the previously selected image on
document open.
However, when I drop an image onto the NSImageView it is sending
NSImage data to my bound NSString attribute:
*** Canceling drag because exception
'NSInvalidArgumentException' (reason 'Unacceptable type of value for
attribute: property = "bgImagePath"; desired type = NSString; given
type = NSImage; value = NSImage 0x5358820 Size={134, 200} Reps=(
NSBitmapImageRep 0x3b29d0 Size={134, 200}
ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=24 Pixels=134x200
Alpha=NO Planar=NO Format=0
).') was raised during a dragging session
valuePath and valueURL are Read-Only bindings according to the
Bindings Ref so I would expect it to "send" nothing on image drop. I
was going to save the path/url using a standard target action method
on drop... but I can't get to that point.
Am I misunderstanding what a Read-Only binding means?
I suppose I could just save the actual image data instead....
Thanks,
George
_______________________________________________
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