• 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
If Array Controller is empty, how to populate pop-up list?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: If Array Controller is empty, how to populate pop-up list?
      • From: Ken Thomases <email@hidden>
    • Re: If Array Controller is empty, how to populate pop-up list?
      • From: Jenny M <email@hidden>
  • Prev by Date: Re: NSDocument
  • Next by Date: Re: NSDocument
  • Previous by thread: Re: NSArrayController Conceptual Problem
  • Next by thread: Re: If Array Controller is empty, how to populate pop-up list?
  • Index(es):
    • Date
    • Thread