Bad menuName

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Bad menuName

Post by dunbarx » Wed Nov 25, 2015 4:28 pm

I tried to

Code: Select all

set the menuName of card button "xyz" to stack "xxx"
I get an error stating that "(Chunk: source is not a container)"

It turns out the dictionary and the user guide are wrong. You cannot use the word "stack" at all. has to be

Code: Select all

set the menuName of card button "xyz" to "xxx"
Worth mentioning? I would have simply added a note to the dictionary, but it has been a while since that was an option.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Bad menuName

Post by FourthWorld » Wed Nov 25, 2015 5:37 pm

Using:

Code: Select all

...stack "stackname"
...resolves to an object.

To obtain a string usable as a menu item try:

Code: Select all

...the name of stack "stackname"
or:

Code: Select all

...the long name of stack "stackname"
or:

Code: Select all

...the short name of stack "stackname"
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Bad menuName

Post by Klaus » Wed Nov 25, 2015 5:42 pm

We know this, Richard, but the dictionary obviously doesn't! :D

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Bad menuName

Post by FourthWorld » Wed Nov 25, 2015 5:48 pm

My bad. Given where this was posted and the content of the OP I thought it was a request for assistance rather than a bug report.

I've filed the bug report for Craig:
http://quality.livecode.com/show_bug.cgi?id=16491
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Bad menuName

Post by dunbarx » Wed Nov 25, 2015 6:19 pm

Richard.

I struggled with this for a while, being the first time I ever played with it. It seemed both intuitive and reasonable to me that the "target" actually include the object (stack) reference, and not just the name of the stack. It was only because I am used to screwing around in this way that I tried the name alone, not expecting it to work at all.

A side note, what is going on with the dictionary notes? They are as ephemeral as the "sample stacks".

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Bad menuName

Post by FourthWorld » Wed Nov 25, 2015 7:24 pm

"ephemeral"? What's happening with those?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10354
Joined: Wed May 06, 2009 2:28 pm

Re: Bad menuName

Post by dunbarx » Wed Nov 25, 2015 7:33 pm

Richard.

They are only intermittently available. That is, they are almost always not.

I check now and then for the entries where I placed notes, so I can see if they are listed. Once in a while I can see them. I think they are invaluable, for just the above sort of issues, never mind helpful twists or cautions.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10057
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Bad menuName

Post by FourthWorld » Wed Nov 25, 2015 7:54 pm

dunbarx wrote:They are only intermittently available. That is, they are almost always not.
Work was done on that a few versions back. If you're still seeing problems there please file a bug report.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply