> for( int t = 0; t < _menuBar->size(); ++t )
> { Fl_Menu_Item *m = (Fl_Menu_Item*)&(_menuBar->menu()[t]);
> std::cout << m->label() << std::endl;
> }
I think your for loop is wrong - you are dereferencing NULL values.
Try this instead:
for(int t = 0; t < _menuBar->size(); t++) {
Fl_Menu_Item *m = (Fl_Menu_Item *)&(_menuBar->menu()[t]);
if((m) && (m->label())) {
std::cout << m->label() << std::endl;
}
}
Note that your menu shorcuts are probably broken too - you have
liberally littered your menu items names with "&" symbols, which fltk
will try and convert into global shortcuts - so a menu item named
"&Save" will be allocated a shortcut of <key>-s but you have used the
same symbols in multiple places (e.g. &Copy, &Close or &Save and "&Save
As", etc...) AND you have allocated specific shortcuts to the keys...
Confusing and probably inclined to giving inconsistent behaviours.
Also - I'm sure you have your reasons, but that seem to be a very
complicated way to set your callbacks up...
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk