main stack and substack questions

Sarah Reichelt sarah.reichelt at gmail.com
Fri Mar 30 17:34:11 EDT 2007


> Have a substack and when the card opens it looks for a background image
>
> set the itemdelimiter to slash
>     put the filename of this stack into dbPath
>     delete the last item of dbPath
>     put "/cartridge fork.PNG" after dbPath_#
>     set the filename of image "cartridge fork.PNG" to dbPath
>
> dbPath is empty I think it is because if you look in the stack properties
> under filename it has a [inherited] at the end, how do I correct this?

Use the "effective" keyword:
    put the effective filename of this stack into dbPath

"effective" can be used for any inherited property and will get the
value in use, even if it is not specifically set for the object you
are checking.


> Second question
>
> If I open a substack from substack how do I pass the card name and stack
> name as a variable to replace "view_valving" and "insertvalving" in the
> following code?
>
> put fld "newrecord_id" of card "view_valving" of stack "insertvalving" into
> fld "record_id"
>

put "otherCardName" into tCardName
put "otherStackName" into tStackName
put fld "newrecord_id" of card tCardName of stack tStackName into fld
"record_id"

Cheers,
Sarah



More information about the use-livecode mailing list