First day at the 'office' for this LiveCode Newbie
Posted: Wed Jan 09, 2013 10:33 am
Hi !
Wondered if someone could help ?
I'm new to LiveCode (come from years of VB, PCS, Corona and various others) and am following the various tutorials to 'port' an existing PCS app into LiveCode.
I fell at the first hurdle !! I'm trying to create a 'Global' variable. One which will be available to all handlers on all cards within a stack. Currently I have the line :
and have placed it both within various handlers ('on startup', 'on stack open' etc) and as the first line of code (before and outwith any handlers) in my 'Stack' code page.
Each time I try to 'Apply' the use of the variable to any handler on a Card within the Stack I receive the error message :
button "chkMaintenance": compilation error at line 4 (Chunk: can't create a variable with that name (explicitVariables?)) near "gbABC", char 16
or very similar !
Can someone nudge me in the right direction please ?
Is there any basic help on how to declare variables and assign them 'types' (numeric, floating, string, boolean etc). I have read (and think I understand) the variable 'scope' logic within LiveCode - all makes sense but can't find how to declare a type and for the life of me (all day yesterday) can't work out why I can't access my global accross various Cards within my Stack.
Any and all kicks in generally the right direction would be welcome.
Thanks in advance.
Wondered if someone could help ?
I'm new to LiveCode (come from years of VB, PCS, Corona and various others) and am following the various tutorials to 'port' an existing PCS app into LiveCode.
I fell at the first hurdle !! I'm trying to create a 'Global' variable. One which will be available to all handlers on all cards within a stack. Currently I have the line :
Code: Select all
global gbABC
Each time I try to 'Apply' the use of the variable to any handler on a Card within the Stack I receive the error message :
button "chkMaintenance": compilation error at line 4 (Chunk: can't create a variable with that name (explicitVariables?)) near "gbABC", char 16
or very similar !
Can someone nudge me in the right direction please ?
Is there any basic help on how to declare variables and assign them 'types' (numeric, floating, string, boolean etc). I have read (and think I understand) the variable 'scope' logic within LiveCode - all makes sense but can't find how to declare a type and for the life of me (all day yesterday) can't work out why I can't access my global accross various Cards within my Stack.
Any and all kicks in generally the right direction would be welcome.
Thanks in advance.