Help needed: quoting variable

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ChrisMukrow
Posts: 73
Joined: Mon Nov 12, 2012 4:13 pm

Help needed: quoting variable

Post by ChrisMukrow » Tue Jan 14, 2014 1:35 pm

Who can help me with this simple problem? When using the code below, you can't trigger the mouseUp. But when quoting line 2,3,4 you can, so I need to know how to quote a variable. Thanks!

Code: Select all

"on mouseUp" & cr & \
"put directoryAZ into cardNumberHolder" & cr & \
"put" && tChildTitles[getID] && "into titleHolder" & cr & \
"put" && tLink[getID] && "into linkURL" & cr & \
"go to card 46" & cr & \
"end mouseUp" into theScript
      
---------
set the script of button ("link" & x) to theScript
---------

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

Re: Help needed: quoting variable

Post by Klaus » Tue Jan 14, 2014 2:12 pm

Hi Chris,
ChrisMukrow wrote:so I need to know how to quote a variable.
well you already wrote it:

Code: Select all

...
put QUOTE & tVar & QUOTE into tQuotedVar
...
:D

I have a little function for this:

Code: Select all

function q tString
  return QUOTE & tString & QUOTE
end q

Code: Select all

...
put q(tVar) into tQuotedVar
...
Best

Klaus

ChrisMukrow
Posts: 73
Joined: Mon Nov 12, 2012 4:13 pm

Re: Help needed: quoting variable

Post by ChrisMukrow » Tue Jan 14, 2014 2:37 pm

Thanks Klaus! And nice function! :D

Post Reply