PopUpClick statement doesn't work with submenus

Issue #547 new
Jim Rea repo owner created an issue


Note: This is not documented to work, and did not work in Panorama 6. However, it would be nice if it did work. Here is code submitted by David Duncan that demonstrates this. Note that the "CODE" options are necessary or else the menus will be disabled.

fileglobal fRunsPUMchoice

submenu("DC bookings")+
menuitem("Open bookings window","CODE","")+
menuitem("Print bookings calendar","CODE","")+
menuitem("Enter a manual booking","CODE","")+
submenu("Truck bookings")+
menuitem("Make a truck booking")+
menuitem("Re-send a truck booking")+
menuitem("Cancel a truck booking")+
menuitem("DC bookings…","SUBMENU","DC bookings")+
menuitem("Truck bookings…","SUBMENU","Truck bookings"),

Comments (2)

  1. Jim Rea reporter

    Michael Kellock reports a possibly related problem with popupdoublefieldchoices statement -- "I can't get a result for the second array element in myChoice - using data in two fields, the myChoice array only ever has one element. The sub-menu items are greyed out. Tested on two Macs."

  2. Jim Rea reporter

    The code below does work, sort of. The submenus do work, but colorChoice is not set to the item value for submenu items.

    Need to figure out why it is different than the code in the original report. Ok, it appears to depend on what is in the Code source, empty text (““) doesn’t work, and “nop” doesn’t work, but “a”, “aa”, etc does work. Aha - it works if the code contains an error!! If the code is valid it runs the code, then pops up the menu again. If the code is not valid, it returns and falls thru to the message statement. Note: «» in the code is not expanded to the menu text.

    local colorChoice,MenuText
      "(Colours)"+cr()+ tab()+"Red"+tab()+"(RedSubmenu)$1ɜ"+cr()+
    popupbutton MenuText,"",colorChoice
    message colorChoice+cr()+info("menuidentifier")

    This code is from:


  3. Log in to comment