I have an array named ‘discount_applications_array’ that contains: (1,2,3) within my context that I would like to access from a XojoScript.
I am attempting to input it into the script with the following:
dim dsc() as string
dsc.append discount_applications_array
print dsc(0)
and this:
dim dsc() as string
dsc = discount_applications_array
print dsc(0)
If we use a single item instead of an array it works otherwise when using an array we get: “[2:6-2:33] This item does not exist.” when using the XojoScript Example Application.
You can create a method in the context object which expects the index as parameter and returns the item for the index. Another method which appends an entry and one which sets an entry.