If Array Controller is empty, how to populate pop-up list?
If Array Controller is empty, how to populate pop-up list?
- Subject: If Array Controller is empty, how to populate pop-up list?
- From: Jenny M <email@hidden>
- Date: Thu, 14 Jan 2010 14:09:45 -0800
Hi all,
I have an Array Controller whose objects are displayed in an NSPopUpButton.
I can add and remove objects, and they refresh automatically in the box as
expected.
However, what can I do if the array controller becomes empty? If I delete
all the objects, or if the window starts up with an empty array controller,
I'd like for the list to then have a null element that says "No objects."
Once an object is added, it should go away. But if I choose "Insert null
placeholder" in the pop-up options, the null placeholder is ALWAYS there,
which is not good.
Is there a way to do this in IB, or is this a thing I should code? And if
so, how can I make sure the method is called whenever there is a change to
the array controller?
Thanks in advanced...
_______________________________________________
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