Continuing my foray into LMSL and nested custom menus, I’m stumped. I can make a lot of small, test menus work, with up to 4 levels (that’s as far as Ive tried, but I’m sure I could go deeper if needed.) When I try for a real one, I’m limited to two levels. Can anyone see what I’m missing here? The Auto submenu should show up at a new Level Three, but I can’t get the menu choices to show up. The other three work fine at level Two. I’ve tried putting the formula into locals, windowglobals, and inserted as text into the window bar statement, with many different results (all bad). Can anyone spot the problem? Thanks!
M1 Macbook Sequoia 15.2 Pan 10.2 (4555)
However, I’m also not sure why you are choosing the hard way to create menus. I would suggest that you use the menu generation functions rather than trying to create LMSL codes directly. I created this code that does work. It doesn’t have all of your menu items, but I got tired of typing. I’m pretty confident that it will continue to work with all of your items.
Yup. All of that code started with menu generation functions, but failed to get to level three. I couldn’t see why and, since I type WAY slower than you, I made a bunch of mini “pretend” menus that also worked just fine. When I couldn’t find anything wrong with my menu generation function code, I had it show me the money in LMSL, which is how I got here. If you can’t see any issues with the LMSL, then there must be a hidden character or two somewhere.
I will keep you posted.
I did see one problem with your code - you used Auto SubMenu in one place and Auto Submenu in another. No bueno. However, correcting that didn’t fix the problem. Also, I tried putting this submenu into the main menu and it didn’t work there either, so the problem isn’t multiple levels. After futzing around for 15-20 minutes I decided I had taken enough time trying to reverse engineer what you had done. I then started over to make sure that multiple nested levels of submenus worked with the menu generation functions, it does.
FYI, the only time I ever look at the LMSL is when I’m debugging the underlying Objective-C code. I would recommend that you pretend that LMSL doesn’t exist.
Ok… Now there are two Custom Menu issues. First, I’ve redone the original, using the menu functions. Now I’m now getting the “Auto” menu item at the third level, as expected, but the “RE Submenu”, in the second level, is missing.
Sequoia 15.2, Macbook Pro M1,Pan 10.2 (4555) Second issue next post.
Issue 2 - Trying to simplify the debugging, and reduce typing, I made a new menu, with three levels - Cities, Streets and Blocks. I thought I’d make the Blocks submenu just once (“1,2,3,4”) so it could be used interchangeably between streets. Unfortunately, using the “Blocks” submenu more than once caused a hard freeze, with most Pan menuitems greyed out, and all inoperable, requiring a Forced Quit. I added a “BlocksA” submenu and called it from various places, and that worked ok, but when I tried to use either “Blocks” or “BlocksA” twice I’d get the hard freeze. Interestingly, I tried using the “RE Submenu” from the previous example for a second time, with the “NonPersonal” menu item on Level 1, and saw no freeze. (Nor did it show up in either instance…FWIW)
Ha! What a treat, to get any answer so quickly… and during Christmas Week. Thanks!
I will keep messing around with it (who knows? I might get lucky…)
Have a great weekend!