• 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: KeyPath retrieval
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KeyPath retrieval


  • Subject: Re: KeyPath retrieval
  • From: Tim Lucas <email@hidden>
  • Date: Tue, 11 Jan 2005 19:23:30 +1100

On 11/01/2005, at 6:24 PM, John Blitch wrote:
If, for example, I bind the keyPath "properties.name" to the an
object's "value" binding, is there any way to retrieve the keyPath?

Don't think so...

It seems like bind:toObject:withKeyPath:options: should have a companion such as
- (NSString *)keyPathForBinding:(NSString *)binding;
that I could pass "value" to and get "properties.name" back from.

A function like this would be useful... but it would be even more useful if it also gave the object it was bound to.


I ask because I'm trying to implement table filtering using a custom
array controller. I'd like to iterate through the columns and use
their keyPaths dynamically rather than having to hard code them into
IF statements.

You could override the bind:toObject:withKeyPath:options: method on the NSColumnHeader to keep track of them there.


I wonder how GandBug does its bindings inspection...

- tim

_______________________________________________
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


References: 
 >KeyPath retrieval (From: John Blitch <email@hidden>)

  • Prev by Date: Re: Dynamically adding tabs during runtime?
  • Next by Date: Initialize and add Combo Box programmatically
  • Previous by thread: KeyPath retrieval
  • Next by thread: Re: KeyPath retrieval
  • Index(es):
    • Date
    • Thread