Binding/KVC : implicit and explicit invocation of description method
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