Text Only Stackscript "in ram" for Dynamically Downloaded Stacks

Sannyasin Brahmanathaswami brahma at hindu.org
Tue Apr 19 23:16:43 EDT 2016


We have a desktop client that Andre built, we distribute a splash-engine for Windows of Mac that downloads the main app rom the server.

The main UI allows for  volunteers to enter metadata for all the media on our server and API’s insert that data into mySql

We built in a little plug in menu that calls widgets from server using go stack url. Use cases vary a lot depending on if someone is working on descriptions for art or we are uploading audio, adding lyrics for songs or working on the now 16,000 plus quotes table etc. so this plug in architecture allows me to whip up something quickly to help alleviate the burden of repetitive tasks. As we all know, this architecture is just “marvelous”  (if iOS would only allow it)

So today I’m building a “Category Picker” stack that will help users choose categories. It is a single card UI
I was thinking to just draft the UI with fields and buttons  ie. The binary stack component…

 and then put everything else into a text-only script stack then set the behavior of the card to that script stack
Or start using it as a library since really these are global functions like the stack script of the stack itself, not really a case for a behavior.

But of course, if you just do “go stack url “http://myDomain.com/stacks/categorypicker.lc”

The text only stack does not come along with it.  Of course there are lots of obvious solutions.

  *   in a preopen stack handler fetch the script only stack
  *   Start using it as a library
  *   But I don’t want to have to write this to disk

Perhaps the best thing to do is download the script only stack and set the front script to that stack?

I’ve never used front scripts… but you cannot insert a variable into the front script…
 it has to be an object. So we are going to set the script of an object in this scenario it may as well be the stack script itself

It make more logical sense to do something like

Put url “http://mydomain.com/<http://mydomain.com/my>categoriesPicker/cp_stack-script.livecode” into tStackScript
 # we need to remove line 1 if we use the script only stack model
# during development
Delete line 1 of tStackScript
Set the script of this stack to tStackScript

What do you do?

BR


More information about the use-livecode mailing list