Popup vs pull down menu item missing

  • I have a popup menu item with 9 items. If I set the pullsDown
    property to YES I only get 8 items, whereas 9 items display if it is
    NO. (Same behaviour if it is set in IB.) I'm on Tiger 10.4.10. Does
    something else need to be set for a pull down menu? This is certainly
    breaking the principle of least surprise! Both NSPopUpButton and
    NSPopUpButtonCell exhibit this behaviour.

    Thanks
    Ian
  • On Sep 27, 2007, at 9:55 PM, Ian Joyner wrote:

    > I have a popup menu item with 9 items. If I set the pullsDown
    > property to YES I only get 8 items, whereas 9 items display if it
    > is NO. (Same behaviour if it is set in IB.) I'm on Tiger 10.4.10.
    > Does something else need to be set for a pull down menu? This is
    > certainly breaking the principle of least surprise! Both
    > NSPopUpButton and NSPopUpButtonCell exhibit this behaviour.

    Hey Ian,

    It seems like the menu item indexing of pull-down style lists could
    be the cause of your trouble:

    "Note that in a pull-down list, the first item is stored at index 1,
    not index 0 as is the case with pop-up lists or ordinary menus. This
    is done so that the pull-down list’s title can be stored at index 0
    if necessary. Even when the title is stored at index 0, always change
    the buttons title with the setTitle: method."

    See <http://developer.apple.com/documentation/Cocoa/Conceptual/
    MenuList/Articles/ManagingPopUpItems.html#//apple_ref/doc/uid/
    20000274-DontLinkElementID_4
    > for more info.

    - Sean
  • Thanks Sean. And pull downs have slightly different functionality
    too, which is not what I wanted (just the down arrow looked neater in
    the context of what I am using). (Wish Apple would also have this
    information in their reference docs.)

    Ian

    On 28/09/2007, at 12:34 PM, Sean Murphy wrote:

    >
    > On Sep 27, 2007, at 9:55 PM, Ian Joyner wrote:
    >
    >> I have a popup menu item with 9 items. If I set the pullsDown
    >> property to YES I only get 8 items, whereas 9 items display if it
    >> is NO. (Same behaviour if it is set in IB.) I'm on Tiger 10.4.10.
    >> Does something else need to be set for a pull down menu? This is
    >> certainly breaking the principle of least surprise! Both
    >> NSPopUpButton and NSPopUpButtonCell exhibit this behaviour.
    >
    > Hey Ian,
    >
    > It seems like the menu item indexing of pull-down style lists could
    > be the cause of your trouble:
    >
    > "Note that in a pull-down list, the first item is stored at index
    > 1, not index 0 as is the case with pop-up lists or ordinary menus.
    > This is done so that the pull-down list’s title can be stored at
    > index 0 if necessary. Even when the title is stored at index 0,
    > always change the buttons title with the setTitle: method."
    >
    > See <http://developer.apple.com/documentation/Cocoa/Conceptual/
    > MenuList/Articles/ManagingPopUpItems.html#//apple_ref/doc/uid/
    > 20000274-DontLinkElementID_4> for more info.
    >
    > - Sean
    >
    >
  • On Fri, 28 Sep 2007 13:21:46 +1000, Ian Joyner <ian.joyner...>
    said:
    > Thanks Sean. And pull downs have slightly different functionality
    > too, which is not what I wanted (just the down arrow looked neater in
    > the context of what I am using). (Wish Apple would also have this
    > information in their reference docs.)

    Well, I did a search at developer.apple.com and the first two distinct hits
    were:

    <http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGui
    delines/XHIGControls/chapter_18_section_3.html
    >

    <http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles
    /ManagingPopUpItems.html
    >

    I think that *is* "having this information in their reference docs." (It's
    true that the HIG docs have not kept up with recent innovations and changes,
    but this is not a case in point.)

    m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
    AppleScript: the Definitive Guide - Second Edition!
    <http://www.amazon.com/gp/product/0596102119>
  • On 01/10/2007, at 5:54 AM, Matt Neuburg wrote:

    > On Fri, 28 Sep 2007 13:21:46 +1000, Ian Joyner
    > <ian.joyner...>
    > said:
    >> Thanks Sean. And pull downs have slightly different functionality
    >> too, which is not what I wanted (just the down arrow looked neater in
    >> the context of what I am using). (Wish Apple would also have this
    >> information in their reference docs.)
    >
    > Well, I did a search at developer.apple.com and the first two
    > distinct hits
    > were:
    >
    > <http://developer.apple.com/documentation/UserExperience/Conceptual/
    > OSXHIGui
    > delines/XHIGControls/chapter_18_section_3.html>
    >
    > <http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/
    > Articles
    > /ManagingPopUpItems.html>
    >
    > I think that *is* "having this information in their reference
    > docs." (It's
    > true that the HIG docs have not kept up with recent innovations and
    > changes,
    > but this is not a case in point.)

    Thanks, but they are conceptual docs, not reference docs. What I'm
    suggesting is that the reference docs, such as:

    http://developer.apple.com/documentation/Cocoa/Reference/
    ApplicationKit/ObjC_classic/index.html

    should contain every bit of information, even in a boring terse form
    (which it is anyway), from which the conceptual docs take that info
    and put it in a more palatable form and so you get the overall
    picture (although what's in the first 'conceptual' document seems
    more normative than informative (eg., spelling out intricate spacing
    details, which won't be of interest to a new comer). Perhaps better
    cross referencing of material. Maybe, what I'm saying is much
    information is hard to find (someone's going to disagree with that).
    I think Apple keep coming up with new arrangements every major OS
    release to alleviate that. Anyway, sorry, it's easy to seem critical,
    but I'm trying to make some constructive suggestions, even though
    they may not be very deep.

    Ian
  • On Tue, 2 Oct 2007 10:18:29 +1000, Ian Joyner <ian.joyner...>
    said:
    > Thanks, but they are conceptual docs, not reference docs. What I'm
    > suggesting is that the reference docs, such as:
    >
    > http://developer.apple.com/documentation/Cocoa/Reference/
    > ApplicationKit/ObjC_classic/index.html
    >
    > should contain every bit of information, even in a boring terse form
    > (which it is anyway), from which the conceptual docs take that info
    > and put it in a more palatable form and so you get the overall
    > picture (although what's in the first 'conceptual' document seems
    > more normative than informative (eg., spelling out intricate spacing
    > details, which won't be of interest to a new comer). Perhaps better
    > cross referencing of material. Maybe, what I'm saying is much
    > information is hard to find (someone's going to disagree with that).
    > I think Apple keep coming up with new arrangements every major OS
    > release to alleviate that. Anyway, sorry, it's easy to seem critical,
    > but I'm trying to make some constructive suggestions, even though
    > they may not be very deep.

    I think a lot depends on what you mean by "contain". Let's start with the
    document you listed above. It doesn't "contain" any expository text at all;
    it's just a list of classes. But they are hyperlinks. So clearly you must
    think that "contain" can mean "contain as a hyperlink".

    Very well, let's click a hyperlink for the class you might be using
    (NSPopUpButton). At the very top of the page that appears, in a box just
    below the title, it says:

    "Companion guide: Application Menu and Pop-up List Programming Topics for
    Cocoa"

    That means, loosely translated: "I (the present page) contain the info on
    methods for how the NSPopUpButton class *works*, qua class. If you want to
    know what an NSPopUpButton *is*, click this link (which I 'contain')."

    And when you do click it, there you are in a little multi-chapter "booklet",
    one of whose chapters is about "Pop-Up Buttons and Pull-Down Lists" and the
    differences between them.

    I think that's a pretty darned good arrangement! m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
    AppleScript: the Definitive Guide - Second Edition!
    <http://www.amazon.com/gp/product/0596102119>
  • > On Tue, 2 Oct 2007 10:18:29 +1000, Ian Joyner <ian.joyner...>
    > said:
    >> Thanks, but they are conceptual docs, not reference docs. What I'm
    >> suggesting is that the reference docs, such as:
    >>
    >> http://developer.apple.com/documentation/Cocoa/Reference/
    >> ApplicationKit/ObjC_classic/index.html
    >>
    >> should contain every bit of information, even in a boring terse form
    >> (which it is anyway),

      Okay, that tears it: mmalc and his group are fired. We're hiring
    satirist Dave Barry to write our technical documentation from now on!
    Accuracy and efficiency be damned - what this API reference needs is
    PIZZAZ!!! ;-)

    --
    I.S.
  • On 03/10/2007, at 3:40 AM, I. Savant wrote:

    >> On Tue, 2 Oct 2007 10:18:29 +1000, Ian Joyner
    >> <ian.joyner...>
    >> said:
    >>> Thanks, but they are conceptual docs, not reference docs. What I'm
    >>> suggesting is that the reference docs, such as:
    >>>
    >>> http://developer.apple.com/documentation/Cocoa/Reference/
    >>> ApplicationKit/ObjC_classic/index.html
    >>>
    >>> should contain every bit of information, even in a boring terse form
    >>> (which it is anyway),
    >
    > Okay, that tears it: mmalc and his group are fired. We're hiring
    > satirist Dave Barry to write our technical documentation from now on!
    > Accuracy and efficiency be damned - what this API reference needs is
    > PIZZAZ!!! ;-)

    OK, I take the satire to be the exact opposite of what I'm saying ;-)

    I don't want to make some blanket statement about the quality of the
    documentation – it's pretty high, and writing documentation is
    ultimately a no-win situation, so I'm not trying to sound like an
    ingrate. The problem stems from the scale – there's a lot there and
    sometimes it is fragmented, and you don't know there is something
    else you should look for, like the semantics of pop-up and pull-down
    menus are different, which led to some surprising behaviour.

    Maybe, the problem comes from using the same class to handle popups
    and pull downs, and thus the documentation people are left to make
    the best of a perhaps bad situation. NSPopUpButtonCell certainly
    contains a better "overview" than NSPopUpButton, but while Cell
    points out there is a difference between popup and pulldown, does not
    really precisely define it.

    So, what I'm saying is precise definitions of everything should be in
    the reference material, without having to go and read the conceptual
    material, but if you can't understand the definition then go back to
    the conceptual material. There is also a general debate about whether
    reference material and conceptual material should be separated at
    all. Bertrand Meyer tends to dislike that form of separation (as he
    dislikes the traditional waterfall separation between analysts and
    programmers), and so generally weaves conceptual and reference
    material together into a highly readable document. Even so, he still
    produces a reference book for Eiffel which contains a precise
    definition of everything, that only a compiler writer might appreciate.

    The nature of documentation is still evolving – I don't think we make
    the best use of hypertext, but then again hypertext can be very
    abused as seen on most Web sites where you feel you are going around
    in circles. Fragmented chunks also makes it easy to perform some
    searches, but difficult for others – that's why I often open up the
    PDF, so I can search on terms through a whole document.

    I think that setPullsDown: needs some modification. Maybe the problem
    is in the line "This method does not change the contents of the menu;
    it changes only the style of the menu.", because the content of the
    menu was changed – I lost an item, which was gobbled up for the title
    or something.

    Anyway, I'm glad that you come out in defence of mmalc et al., but
    don't assume that any comment on the documentation is just from
    someone blowing hot air, or from someone who does not know what they
    are talking about.

    Ian
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today