Hi,
I have the following C++ code...
menuItem &menuItem::operator=(String s)
{
item = s;
if (no == 0) {
fl_addto_menu(obj, item.chars());
no = fl_get_menu_maxitems(obj);
} else
fl_replace_menu_item(obj, no, item.chars());
fl_set_menu_item_mode(obj, no, mode);
fl_set_menu_item_shortcut(obj, no, shortcut.chars());
return *this;
}
menuItem &Menu::addto(String s)
{
menuItem *itm;
itm = new menuItem(obj);
itm->Shortcut(s.at(RXuppercase));
*itm = s;
items.append(itm);
return *itm;
}
To get a menu I do...
menu = new Menu(FD_OBJECT *);
menu->addto("First");
Where the 'F' should be automatically set as the default shortcut. However,
I number the items from the value returned by fl_get_menu_maxitems(FL_OBJECT *),
but any calls to this function will always return 0? The menu will showup OK,
but the number returned will still show 0? am I missing something?
----------------------------------------------------------------------------
Orn Einar Hansen oe.hansen@oehansen.pp.se
oehansen@daimi.aau.dk
voice+fax; +46 035 217194
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/