Array Properties in a Standalone

Bob Sneidar bobsneidar at iotecdigital.com
Tue Jan 10 22:52:17 EST 2017


I'll try to explain a bit better. I have a splash stack that serves no other purpose than presenting the user with a window with a logo and a message that it is loading the application. It then opens the "actual" mainstack of the application and hides itself. This mainstack is NOT the one that gets saved as a binary file that cannot be edited. That is the Splash Stack (I even call it Splash).

So now the MainStack called "Forms Generator", a regular stack file like all of it's substacks, does some setup stuff. Of particular note it opens a substack of itself called Login. Login accesses a database of valid users, and presents the person with a login name and password. If the password matches a decrypted saved password, it saves the array of login values (called logindata), loginid, username, firstname, last name, accesslevel... you get the idea, as a property of the mainstack Forms Generator.

Because of this, I am able to retrieve that array from the mainstack and then update every updateby column of every record I insert or update in the database with the value logindata ["fisrtname"] && logindata ["last name"], in my case "Robert Sneidar". Good so far?

In the IDE this works famously. In a compiled application however, the column updateby in every table I insert or update is empty. The only explanation I can come up with for this is that arrays do NOT get stored properly is stacks or substacks. Normal values I can retrieve for sure, because I store the current unique ID's of table records like custid, siteid, deviceid etc. in properties so that I can retrieve  them later when inserting/updating into the SQL database. That works in the IDE AND Standalones.

But when I retrieve ARRAYS from properties in Standalones, I get squadouche. Empty values. If this is an aberration, I can test this by opening a log file and saving the printkeys of an array after I retrieve it to see what is in it.

Bob S


On Jan 10, 2017, at 19:33 , Monte Goulding via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:


On 11 Jan 2017, at 2:24 pm, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:

Ooookaaay. In the IDE I can set a property of the mainstack (not the Splash Stack mind you that I use to "shell" the application) to an array. When I retrieve that property and access a key of that array, all is well. HOWEVER... when I compile to a standalone, that key is apparently inaccessible.

I’m not sure if I understand your description of the problem but if you are trying to save to a stack that is embedded in the executable then that won’t work.

Cheers

Monte



More information about the use-livecode mailing list