Confused by name space
Posted: Mon Jun 29, 2020 10:24 am
Hi,
I have some code that is working but that I think should fail :
The following snip is being run from stack "A", it creates a new card in a second stack and adds a field to it. Next it changes some of the field properties. What I don't understand is why I don't seem to have to enter the "of stack "SecondStack" to the references to the field.
I entered these lines forgetting to add the full card and stack references. I suspect the the go to card call has something to do with it but I wonder how robust the code is given that it is run from a second stack. Any thoughts?
I have some code that is working but that I think should fail :
The following snip is being run from stack "A", it creates a new card in a second stack and adds a field to it. Next it changes some of the field properties. What I don't understand is why I don't seem to have to enter the "of stack "SecondStack" to the references to the field.
Code: Select all
/* Create a new card in the stack UT_Documentation to hold documentation */
Create card tNameOfControl in stack "UT_Documentation"
lock screen
go to card tNameOfControl of stack "UT_Documentation"
create field "ControlName" in card tNameOfControl
set the width of field "ControlName" to 350
set the loc of field "ControlName" to 200,30
set the textsize of field "ControlName" to 15
set the textstyle of field "ControlName" to "bold"
put tNameOfControl into field "ControlName" of card tNameOfControl of stack "UT_Documentation"