Closed macMikey closed 5 years ago
Not currently but I should be able to add that. I’m not able to look at the code right now but I would guess that a variable parameter list would work. I’ll look at it tonight.
I was trying to think about how to add the syntax. I suppose n parameters could be added to levureAppHasProperty
and that would get us n levels deep. Then you would do something like
if levureAppHasProperty "key","subkey"
function levureAppHasProperty pProp
if the paramcount is 1 then
return pProp is among the keys of sAppA
else
local i, tIndexA
repeat with i = 1 to the paramcount - 1
put param(i) into tIndexA[i]
end repeat
return param(the paramcount) is among the keys of sAppA[tIndexA]
end if
end levureAppHasProperty
put levureAppHasProperty("preferences filename", "user", "default")
I'll commit that to the dev
branch.
levureAppHasProperty
can't check for key.subkey, right?