bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in popup button


From: Alexander Malmberg
Subject: Re: bug in popup button
Date: Sat, 12 Apr 2003 15:03:54 +0200

Serg Stoyan wrote:
>   On OPENSTEP, InteraceBuilder doesn't allow to remove last item from
>   NSPopUpButton. I think we should do it as well, so removeAllItems should
>   leave item with empty title or item at index 0. I'll check it with
>   OPENSTEP.

This is wrong. The documentation simply states the -removeAllItems
removes all items, and testing on OPENSTEP confirms that it does this
(besides, it makes no sense to leave items in the item list just to
prevent the drawing from crashing).

Leaving an item in the internal item array for drawing purposes can be
one way of handling the issue, but you need to be _extremely_ careful
that the dummy item is _never_ seen outside NSPopUpButtonCell, and I
think trying to handle it that way will be a lot trickier and more
fragile then dealing with an empty array when drawing.

I'm adding some tests for this to the -gui test suite, so regardless of
how it is implemented, they need to pass.

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]