NSNoSelectionMarker and friends
NSNoSelectionMarker and friends
- Subject: NSNoSelectionMarker and friends
- From: Glen Low <email@hidden>
- Date: Fri, 20 May 2005 18:25:25 +0800
Dear Gurus of the Cocoa Bindings
(With the number of questions I've been asking, it must be time for me to offer up some ritual sacrifice :-) )
I have my custom NSController subclass bound to a NSMutableDictionary field, through IB. The field is actually the selection of an NSArrayController.
Questions:
1. Why do I not get automatic notifications of the NSMutableDictionary changing e.g. when the NSArrayController selection changes? On the one hand, I can see the inbuilt bind:ToObject: trying to call addObserver: on other fields, and I do get my setXXX methods called; on the other hand, the only way I get notifications with this particular field is if I manually call addObserver: in my bind:ToObject: override. I thought bind:ToObject: called addObserver: automatically?
2. When there's no selection, other bound controls are correctly disabled and cleared. I believe it's because they are bound to dictionary.subfield, which returns a NSNoSelectionMarker. But I'm binding to dictionary itself, so how do I detect that the dictionary is a no selection placeholder?
Cheers, Glen Low
--- pixelglow software | simply brilliant stuff www.pixelglow.com aim: pixglen
|
_______________________________________________
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