• 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
NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
      • From: George Orthwein <email@hidden>
  • Prev by Date: How to control the commit of text edit field with binding?
  • Next by Date: copying views how to but change 1 w/o changing the other?
  • Previous by thread: Re: How to control the commit of text edit field with binding?
  • Next by thread: Re: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
  • Index(es):
    • Date
    • Thread