• 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: Key-Value Binding problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key-Value Binding problems


  • Subject: Re: Key-Value Binding problems
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 2 Nov 2003 17:38:26 -0800

On Nov 2, 2003, at 5:10 PM, Kurt Marek wrote:

I've created some key-value bindings through IB to connect an
NSImageView subclass (myImageView) to an NSArrayController
(myArrayController).
I set up the valueURL of the myImageView as
myArrayController.selection.URLToPDFFile.
Now I'm trying to use drag and drop of a file from the Finder to set
this value. The drag and drop code is in myImageView. Here's a snippet:
I always get the following error when I try the drag and drop:
[<myArrayController 0x345310> setValue:forUndefinedKey:]: this class is
not key value coding-compliant for the key selection.URLToPDFFile
Shouldn't it be key-value compliant if I set up the bindings in IB?

Umm, no, you have to implement the appropriate methods...
<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/index.html>

Or am I just completely missing the point?

I think you are; you'll probably need a value transformer to convert the url...

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Key-Value Binding problems
      • From: Kurt Marek <email@hidden>
References: 
 >Key-Value Binding problems (From: Kurt Marek <email@hidden>)

  • Prev by Date: Re: Controller Layer, Bindings...
  • Next by Date: Re: NSMailDelivery
  • Previous by thread: Key-Value Binding problems
  • Next by thread: Re: Key-Value Binding problems
  • Index(es):
    • Date
    • Thread