OK, you win, kind of. I was just following what it says in the LC dictionary.
By the way, on my Mac -
set the menubar of stack "myStack" to grp "myMenu" of cd 1 of stack "myStack"
gives an error ('source is not a container'), even though
put exists(grp "myMenu" of cd 1 of stack "myStack")
returns true
OTOH your construction where you use the long ID obviously works. Maybe the
Dictionary should be revised a bit.
Thanks for listening.
Graham
On 12 Apr 2014, at 20:42, J. Landman Gay <[email protected]> wrote:
> On 4/12/14, 7:49 AM, Graham Samuel wrote:
>> BTW the form of these statements that set the menuBar and the
>> defaultMenuBar seem to be strange, don't they. I mean, one writes
>>
>> set the menuBar to "myGroup"
>>
>> there is no scoping here - what if there are lots of groups called
>> "myGroup" in different parts of the stack and substack structure? It
>> appears illegal to specify where the group is, I mean AFAIK you can't
>> write
>>
>> set the menuBar to grp "myGroup" of card 1 of stack "myLibraryOfGroups"
>>
>> it isn't really like the rest of the LC language, is it?
>
> It works here. I routinely do this:
>
> set the menubar of this stack to the long id of grp "myMenu"
>
> and when I test in the message box:
>
> put the menubar of this stack
>
> I get:
>
> group id 5132 of card id 2876 of stack "/Users/me/folder/stack.livecode"
>
> --
> 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
_______________________________________________
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