Files
2026-02-02 04:50:13 +01:00

51 lines
1.2 KiB
Plaintext

-- basic references
set a = cast 1
set a = cast "castname"
set a = field 1
set a = field "castname"
set a = script "scriptname"
set a = window "windowname"
-- assign to field reference
put "asdf" into field 1
put "lorem ipsum" into cast 1
-- the property of reference
put the text of cast 1
put line 1 to 5 of field the number of cast "MasterList" into field the number of cast "InventoryList"
-- the loaded of cast
-- real casts
scummvmAssert(the loaded of cast 1)
set test to cast 1
scummvmAssert(the loaded of test)
-- nonexistent casts
scummvmAssert(not the loaded of cast 500)
set test to cast 500
scummvmAssert(not the loaded of test)
put the loaded of cast "fake"
set test to cast "fake"
-- the following test should not be executed
-- we are testing only compilation
if scummvmCompileOnly = 1337 then
-- user-defined handlers/factories w/ reference name
-- (mainly to test grammar, so no factory definition)
set theWindow = Window(mNew,#noGrowDoc,"Window " & windowNumber)
-- other weird stuff with reference name
-- FIXME: We need to find a way of clean execution of these
put window("test")
set window = 1
put window
window("test")
window "test"
window cast
fi
put cast cast