Globally Accessible Array: HOW?
-
@Aidan-Oxley
It's all about the delays.
Wait before setting (for arrays to come into being)
Wait longer before getting attribute value of array (so there's time for it to be set)
I'm going to ponder ways to avoid this degree of complexity for non-programmers. I'm sure I'll come up with an elegant solution.
Perhaps it's been solved before ;)
Many times.
-
@Deeeds I store an array in an object’s attribute, and it works fine,
If you’re on iOS 11:
Also be careful hard coding arrays in iOS 11, in a lot of fields, iOS will replace the regular exact same two quotes with one that symbolises the start and end quote, which causes the array to not work.
But, copying and pasting exact quotes work fine, which is what I do.In HyperPad’s input box behaviour field they do not get replaced, so I type in there and copy and paste.
-
@Kamdroid We must be talking about different things.
I'm entering numbers into an array, in the list on the right, in the "property inspector" of hyperPad.
What are you talking about?
-
@Deeeds said in Globally Accessible Array: HOW?:
@Aidan-Oxley I've tried this. Definitely not something in the "it just works" category. I'm not getting the array when getting the attribute value from the object that has the array set to an attribute.
Maybe I was thinking something else?
-
@Deeeds, @Aidan-Oxley‘s way would work great.
-
@iTap-Development see questions above...
-
@Deeeds An array is seriously just a bunch of text. For example, an array storing the values 1 and 2 looks like this: [“1”,”2”]. I’ll make a test project for ya.
-
@Deeeds Here you go: http://bit.ly/2yVvKfT
-
@Aidan-Oxley That's how an array looks to you. It's not quite that simple underneath. And it's not just text.
-
@Aidan-Oxley Cheers. I'll have a puzzle around in a bit... still fighting with backups and corruption of my "elegant" little factory.