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

Re: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?


  • Subject: Re: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
  • From: George Orthwein <email@hidden>
  • Date: Thu, 11 May 2006 15:19:12 -0400

Well it turns out that I had to subclass NSImageView to get the file path of the image dropped onto it anyway. So here is how I got the valuePath binding to work:

Added to my NSImageView subclass:

- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
{
// store image path in Core Data store of current document
NSString *path = [[[sender draggingPasteboard] propertyListForType:@"NSFilenamesPboardType"] objectAtIndex:0];
[[[[NSDocumentController sharedDocumentController] currentDocument] docPrefs] setValue:path forKey:@"bgImagePath"];

//[super concludeDragOperation:sender];
}


Removing the call to super blocks the NSImageView from accepting the image and sending NSImage data via the valuePath binding (which is supposed to be read only). However, it still *receives* the image path via the binding as it should and updates accordingly.

I'm thinking this is a bug now and will file it.

Hope this helps someone in the future,
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


References: 
 >NSImageView's valuePath/valueURL bindings read-only but sending NSImage data? (From: George Orthwein <email@hidden>)

  • Prev by Date: Re: NSDrawer in System Pref Pane
  • Next by Date: Re: Problem creating binding for deployment
  • Previous by thread: NSImageView's valuePath/valueURL bindings read-only but sending NSImage data?
  • Next by thread: copying views how to but change 1 w/o changing the other?
  • Index(es):
    • Date
    • Thread