• 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
How to use -optionDescriptionsForBinding: ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use -optionDescriptionsForBinding: ?


  • Subject: How to use -optionDescriptionsForBinding: ?
  • From: Pierre Molinaro <email@hidden>
  • Date: Thu, 30 Apr 2009 14:26:13 +0200

Hi,

I am trying to programmatically enumerate all available bindings and their options for a given class. It works fine, except - optionDescriptionsForBinding: that allways returns an empty array of options, for any binding.

The routine I have written is:

static void enumerateBindingsForClass (Class inClass) {
NSObject * object = [inClass new] ;
NSLog (@"Bindings for '%@' class:", [object className]) ;
NSArray * exposedBindings = [object exposedBindings] ;
for (NSUInteger i=0 ; i<[exposedBindings count] ; i++) {
NSString * binding = [exposedBindings objectAtIndex:i] ;
NSArray * options = [object optionDescriptionsForBinding:binding] ; // Allways returns an empty array
NSLog (@" Binding '%@', class '%@', %u options %@", binding, [object valueClassForBinding:binding], [options count], options) ;
}
[object release] ;
}


When I call it with [NSView class] argument, I get:

Bindings for 'NSView' class:
Binding 'hidden', class 'NSNumber', 0 options (
)
Binding 'toolTip', class 'NSString', 0 options (
)

Any ideas what I'm doing wrong?

Thanks,

Pierre

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSScanner off-by-one and I can't see why...
  • Next by Date: Some Question about Core Animation in NSCollectionView
  • Previous by thread: Re: NSScanner off-by-one and I can't see why...
  • Next by thread: Some Question about Core Animation in NSCollectionView
  • Index(es):
    • Date
    • Thread