Why doesn't menupick work

revolution at duncansoftware.on-rev.com revolution at duncansoftware.on-rev.com
Thu Aug 21 07:02:30 EDT 2014


On 8/20/2014, 8:08 PM, revolution at duncansoftware.on-rev.com wrote:
> Why doesn't  this code work?
> 
> on menuPick pItemName
>    go card pItemName
> end menuPick
> 
> where the comboBox has a list of card names.

>>Set a breakpoint at the "go" line and when it pauses, see what's in 
>>pItemName and whether there's a card with that name. You can also 
>>temporarily add "answer the result" after the "go" statement; maybe 
>>there's a silent error happening.

Thanks for everyone's suggestions but...
I tried setting a breakpoint and pItemName contains the name of a card. 
However when I tried "answer the result" the response is
"No such card".
When I use the message box "Put the name of card 1" it reports
card " 1 External  Dorsal ~"
which seems to be saying that "card" is part of the name.
I tried various methods of adding card to the pItemName such as
put "card" && quote & pItemName & quote into pitemName

go pItemName

or 

go card card pItemName

but these also failed and reported "No such card."

The spaces and tilde in the card name is not the problem.
There are 75+ cards and many do not have extra spaces and tildes.

If I just type into the message box
go card " 1 External  Dorsal ~" it goes to the card.

MacBook Pro OSX 10.6.8 and any version of Livecode that I have tried 6.0 6.52 6.60.


More information about the use-livecode mailing list