Closed macMikey closed 5 years ago
The numeric indexes seem to make this harder to handle. Why did you numerically index the array, btw? Was that just a historical artifact?
It returns an array. Levure uses numerically indexed arrays throughout as that is how you can have a list of arrays in LiveCode.
LiveCode makes it easy to iterate over a numerically indexed array of arrays using ‘repeat for each element’. The engine will loop through the elements using the correct order.
repeat for each element tElementA in tArrayA
end repeat
Sorry, I misread this the first time. -
in YAML represents a list. A numerically indexed array is how you represent a list and :
represents an associative array. So the syntax created a list of associative arrays. In LiveCode that is represented with a numerically indexed array of arrays.
So the request you are making doesn’t make sense as helpers
is not serving as an associative array, it is a list.
If I do it for filename
it also fails.
As it should. helpers
is a numerically indexed array of arrays. There is no filename
key at the root level. Just numerically indexed arrays.
Sorry, I meant helpers>filename
That is how I read what you wrote. There is no filename
key at the root of the helpers
key.
then when you're in a list, is the only way to make a subkey to make another list? If I try to make a subkey to an element that begins with a hyphen it doesn't seem to become a subkey.
belay that. i think i read enough levure code to find what i was looking for.
Okay. If you still run into trouble post an example of what you are doing, what you expected to happen, and what is actually happening.
app.yml:
levureAppHasProperty("helpers>folder")
returns falselevureAppGet("helpers>folder")
returns nothing