Dynamic assigning behaviors
Posted: Thu Nov 08, 2012 2:40 pm
Hi I am trying to assign a behavior to a dynamic created graphic but get the following error:
execution error at line n/a (parentScript: bad object) near "graphic id 1109 of card id 1002 of stack "codelibrary" of stack "/Users/theovanstratum/Documents/ProjectX/workflow test.livecode""
The code that assigned the behavior is this:
case "Task"
add 1 to lTaskCounter
put "Task" & lTaskCounter into gName
create graphic gName
set the opaque of graphic gName to true
set the backgroundColor of graphic gName to "white"
set the width of graphic gName to 100
set the height of graphic gName to 50
set the showName of graphic gName to true
set the location of graphic gName to the mouseLoc
set the behavior of graphic gName to the long id graphic id 1109 of card id 1002 of stack "codelibrary"
break
and is part of a popup menu.
The graphic on the card in the substack "codelibrary" exists and the code in there work if I access it on the substack.
Any ideas what I do wrong?
Thanks
execution error at line n/a (parentScript: bad object) near "graphic id 1109 of card id 1002 of stack "codelibrary" of stack "/Users/theovanstratum/Documents/ProjectX/workflow test.livecode""
The code that assigned the behavior is this:
case "Task"
add 1 to lTaskCounter
put "Task" & lTaskCounter into gName
create graphic gName
set the opaque of graphic gName to true
set the backgroundColor of graphic gName to "white"
set the width of graphic gName to 100
set the height of graphic gName to 50
set the showName of graphic gName to true
set the location of graphic gName to the mouseLoc
set the behavior of graphic gName to the long id graphic id 1109 of card id 1002 of stack "codelibrary"
break
and is part of a popup menu.
The graphic on the card in the substack "codelibrary" exists and the code in there work if I access it on the substack.
Any ideas what I do wrong?
Thanks