• 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: Can bindings be set to ignore certain values?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can bindings be set to ignore certain values?


  • Subject: Re: Can bindings be set to ignore certain values?
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 23 Jan 2006 17:13:26 -0500

You might be able to do this with a ValueTransformer that filters the array, removing the items you don't want displayed.


On Jan 23, 2006, at 3:39 PM, Dan Price wrote:

Hey

I have a popup menu with a list of object types and my
program automatically selects the item appropriate to
the object selection. Each object class has a unique
#define number to identify it's type, and is matched
by the tag of the menu items (e.g a Sphere, ID 1000,
has a menu item with tag 1000). I've bound the
selection of the popup menu to the current selection
and it all works.

Except, some object-types don't have an associated
menu item. In fact, I want the menu to be disabled for
these types because the action is not relevant. But
with bindings, cocoa simply adds a new entry to the
menu, with ID number as the name which is not what I
want.

How can I change the bindings so that A) the menu
ignores a range of IDs and B) is disabled for those
values. I had this working in code originally, but I
really want to use bindings.

_______________________________________________ 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
  • Follow-Ups:
    • Re: Can bindings be set to ignore certain values?
      • From: Dan Price <email@hidden>
References: 
 >Can bindings be set to ignore certain values? (From: Dan Price <email@hidden>)

  • Prev by Date: Re: suppressing the scod at startup
  • Next by Date: Re: Does characterIndexForPoint ever return NSNotFound?
  • Previous by thread: Can bindings be set to ignore certain values?
  • Next by thread: Re: Can bindings be set to ignore certain values?
  • Index(es):
    • Date
    • Thread