On 3/15/2015 6:22 PM, Dr. Hawkins wrote:

>
>
>>OK, I found it.  in my setMenus handler, I have
>>
>>set the menuBar of stack otWnNm to the long id of  group "stk_menu" of
>>stack otWnNm

Oh wait. It should be a name, not an ID. I don't know if an ID will work; apparently you're getting something.

>You've assigned a menu from a different stack. This does not copy the
>group, it just loads that menu into the Mac system menu bar. On Windows
>there will be no menus because the group isn't placed on that card.
>
Am I missing something?  both seem to be stack otWnNm (which holds a short
name)

I have a maintenance routine that runs when the filename/version changes.
It loops through the user visible stacks, copies the mcp menu to cd 1 if
there is not already a menu of one of the two defined names (i.e., mcp_menu
for generic menus, and stk_menu if the stack has it's own), and then places
the menu on cd 1 of these stacks on any other cards in the stack that lack
a menu of the same name (I understand that this is unnecessary for mack)


I'm rapidly getting lost, but what it sounds like is that you have the menu group in the stack, but you're assigning the menubar to a group in a different stack. If that's the case, the menu group would be present in the clone as a regular group object but would not being used as the actual menubar -- it would be using the one in the other stack. If both menu groups are identical (which would be the case if they're clones) then they'd look the same in the system menu bar.

But my mental picture of your setup is fuzzy. At any rate, you can try:

set the menubar of stack <clone> to the long name of grp "stk_menu" of stack <clone>

But again, you shouldn't need to do that. Assign the menubar to the original stack using a short name, and any cloned stack will be searched for it. It should work the same way a button reference does; the current stack is searched first. There shouldn't be a need for a handler to set it, but if there is for some reason, use the above syntax.

After the clone is made you can reset any menu items you need to, using the clone stack in the group reference; i.e., grp "stk-menu" of stack "clonedStack".

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to