[REPOST] Bindings problem with NSPopupButton and placeholders
[REPOST] Bindings problem with NSPopupButton and placeholders
- Subject: [REPOST] Bindings problem with NSPopupButton and placeholders
- From: email@hidden
- Date: Tue, 23 May 2006 19:31:52 +0200
Hi,
In my app I'm using bindings for almost everything, and thus far they
have been great. I have one interface problem however. My app
structure is as follows:
- My app's objects are listed in an NSTableView using NSArrayController.
- Based on the object selection in the NSTableView, the user can set
properties (size, color, position) for one or more objects (multiple
selection allowed)
- One of the properties is the object's position. This can be set
using an NSPopupButton and the position is always one of the
following 4 choices: top, bottom, left, right.
- When multiple objects are selected with different positions the
popup displays "Multiple values selected" and "No Selection" if no
records are selected. Just the normal master / detail bindings
behaviour and no problems here.
However, the problem is that the "Multiple values selected" and "No
Selection" items persist in the NSPopupButton as choices once they
have been displayed by this NSPopupButton.
While I have no problem with these placeholders being displayed when
they are appropriate - and I know I can change them - I don't want
them to remain in the list of options in the NSPopupButton. The
position popup has only 4 options and I don't want users to see/
select the "Multiple values selected" item as a fifth position choice
and "No Selection" as a sixth. While I'm quite sure many of our users
are smart enough not to select these placeholders, it does not look
very polished to ship the app like this.
Any ideas on how to avoid these placeholders from staying in the
NSPopupButton? Right now I have set the placeholder string to a
whitespace for both the "Multiple values selected" and "No Selection"
placeholders. This has the positive effect that only one placeholder
is inserted (because they are both identical) but having an extra
blank line in the NSPopupButton menu still looks amateurish. I
searched the list archives and the web, but to no avail. What would
be the best way to fix this?
Thanks,
Peter
_______________________________________________
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