• 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
dynamically adding value transformer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dynamically adding value transformer


  • Subject: dynamically adding value transformer
  • From: David Alter <email@hidden>
  • Date: Tue, 3 Apr 2007 13:57:33 -0700

I'm dynamically creating some buttons and then settup their bindings. This is all working great. Now I have a button where I need to add a Value Transformer. It is my understanding this needs to be added as part of the options for the bind:toObject:withKeyPath:options: method. I'm unclear what needs to be in this options dictionary for this to work.

Here is what I was doing. If the "info" method returns nil I want "myButton" to be disabled. The code is listed below.


NSDictionary * options = [NSDictionary dictionaryWithObject:NSValueTransformerNameBindingOption forKey: NSIsNotNilTransformerName];
[myButton bind:@"enabled" toObject:self withKeyPath:@"info" options:options];


Thank you for the help
-dave

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Rendering an Array Controller contents outside an NSTableView
  • Next by Date: NSView autoresizing
  • Previous by thread: Re: -mouseDownFlags while dragging over NSCells returns 0
  • Next by thread: NSView autoresizing
  • Index(es):
    • Date
    • Thread