• 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
Binding/KVC : implicit and explicit invocation of description method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding/KVC : implicit and explicit invocation of description method


  • Subject: Binding/KVC : implicit and explicit invocation of description method
  • From: Max Barel <email@hidden>
  • Date: Sat, 2 Oct 2004 00:30:08 +0200

Experimenting with bindings, I'm confused by the description stuff.

From IB, I bound an NSTextView value (in single font mode) to an NSDictionary.description, through an NSArrayController.selection.

Running the app, the NSTextview displays the null placeholder, and crash when I change the array selection.
If I bind it to the NSDictionary, everything is like I intended. The dictionary content is correctly displayed and refreshed with the selection of the array controller.

This raise two questions:

- Is the implicit call to description to get the string form of the dictionary a normal feature? If yes I can't find this in the doc.

- Why an explicit call to description method is then wrong? I suppose it end up as NSDictionary.description.description, but why?

I read in an other thread a reply from Scott Anguish stating :

   description has problems with KVO/bindings..
   rename your method and change the bindings to that new name.

But what if the object is from a framework?
What exactly is the description problem?

Max

_______________________________________________
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: Binding/KVC : implicit and explicit invocation of description method
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Boggled By Bindings
  • Next by Date: Re: Limiting notifications to one document
  • Previous by thread: Re: displaying window on activation
  • Next by thread: Re: Binding/KVC : implicit and explicit invocation of description method
  • Index(es):
    • Date
    • Thread