#9 GetMenuItemInfo returns an array, not a hash

v1.0 (example)
closed-wont-fix
nobody
None
5
2008-10-04
2008-01-09
Anonymous
No

Documentation:

GetMenuItemInfo($menuHndl, $cnt)
Receives a menu handler (one we got from GetMenu or GetSubMenu) and a number (which is the location of the item within the given menu).

Returns a hash of which there are currently 2 keys: type can be either "string" or "separator" - this is the type of the menu item text is the visible text of the menu item (provided only for "string" type)

Discussion

  • Dmitry Karasik
    Dmitry Karasik
    2008-10-04

    What you've meant is that GetMenuItemInfo returns list, not a scalar reference to hash. List can actually treated both as array and hash:

    @array = GetMenuItemInfo()
    %hash = GetMenuItemInfo()

    and the latter case was meant here. So in this regard the documentation is correct.

     
  • Dmitry Karasik
    Dmitry Karasik
    2008-10-04

    • status: open --> open-wont-fix
     
  • Dmitry Karasik
    Dmitry Karasik
    2008-10-04

    • milestone: --> v1.0 (example)
    • status: open-wont-fix --> closed-wont-fix