Arrays with Android

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
egolombek
Posts: 74
Joined: Thu Jan 30, 2020 2:11 pm

Arrays with Android

Post by egolombek » Thu Jul 09, 2020 4:27 am

I have encountered a very strange problem and wondering if anyone has insight.

I set up a global array in openCard (that lists the RGB values of colors I want to use, not that that is relevant). I call on those values in field scripts later on. This all works well on my desktop. But, when I test it on my Android phone, the array is not recognized. It's as if Android does not recognize global arrays. Thoughts?

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Arrays with Android

Post by bangkok » Thu Jul 09, 2020 5:53 am

Thoughts ?

You made a little mistake somewhere :D

I do use global arrays with android apps. no problem.

To be sure : create a simple stack with just 1 global array, and 1 button to write it, and 1 button to read it.

and compile for Android.

Idea 2 : change your current stack. Do not set up the array in "opencard" handler but try "openstack" instead (i mean afterwall perhaps you found a bug with opencard message).

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Arrays with Android

Post by SparkOut » Thu Jul 09, 2020 7:48 am

How have you determined the global arrays are not recognised? Android is pretty thin with providing error data.
You say the values are used in field scripts? Have you checked those scripts are firing? Are they native fields? Some Android objects DO behave differently from desktop, but a global array should. I would suspect it is more to do with Android architecture differences than array and variable handling differences. But without any sight of your app, it's pretty hard to know.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”