Mod to the Build up of the popup menu class to allows nested popups by the level No by adding the ALL() function.
PopupClass.GetMenuText PROCEDURE()
C UNSIGNED,AUTO
MenuText CSTRING(MaxMenuStrLen)
OldDepth UNSIGNED(1)
NewStyle BYTE
NewDepth LONG
CODE
IF NOT SELF.NoIcons
LOOP C = 1 TO RECORDS(SELF.PopupItems)
GET (SELF.PopupItems, C)
SELF.CheckMimics
IF SELF.PopupItems.Icon
NewStyle = 1
BREAK
END
END
END
LOOP C = 1 TO RECORDS(SELF.PopupItems)
GET(SELF.PopupItems,C)
IF SELF.PopupItems.Depth = OldDepth
MenuText = MenuText & ‘|’
ELSIF SELF.PopupItems.Depth > OldDepth
MenuText = MenuText & ‘{{’
ELSE
! NEW CODE HERE adding the support for ALL('}')
NewDepth = SELF.PopupItems.Depth - OldDepth
if abs(NewDepth) = 1
MenuText = MenuText & '}'
ELSE
MenuText = MenuText & all('}',abs(NewDepth))
END
END
OldDepth = SELF.PopupItems.Depth
SELF.CheckMimics
IF SELF.PopupItems.Disabled = State:On
MenuText = MenuText & '~'
END
IF SELF.PopupItems.Check <> State:None
MenuText = MenuText & CHOOSE(SELF.PopupItems.Check = State:On,'+','-')
END
DO ExtendedItems
IF ~SELF.Translator &= NULL !Check and call to translator if setup
SELF.PopupItems.Text = SELF.Translator.TranslateString (SELF.PopupItems.Text)
END
MenuText = MenuText & SELF.PopupItems.Text
END
RETURN MenuText