• 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
NSNoSelectionMarker and friends?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSNoSelectionMarker and friends?


  • Subject: NSNoSelectionMarker and friends?
  • From: Glen Low <email@hidden>
  • Date: Sun, 22 May 2005 08:52:36 +0800

Dear Gurus of the Cocoa Bindings

(this is a repost, since I didn't get any answers...)

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
  • Prev by Date: Re: hyper-link style button
  • Next by Date: Automatic build number incrementing
  • Previous by thread: Re: Problems with CurlHandle
  • Next by thread: Automatic build number incrementing
  • Index(es):
    • Date
    • Thread