Library Stack and Mobile
J. Landman Gay
jacque at hyperactivesw.com
Thu Dec 22 15:20:44 EST 2011
On 12/22/11 1:09 PM, Ralph DiMola wrote:
> I know this have been visited and read the forums, but still can't get
> library stack to work on mobile. I am testing on Android but will also be
> deploying to iOS.
>
> I put the library stack into the plug-in folder with a
>
> on preOpenStack
> start using this stack
> end preOpenStack
>
> This makes it only available if you open LC first THEN open your app stack.
> If LC is closed and you click on a app stack the library is not available.
> This was easily fixed by putting 'start using stack "EIS_Library"' in the
> preOpenStack in the app stack.
Instead, go the Plugins Settings in the Development->Plugins menu.
Select your library stack from the popdown. Set it to open when
"Revolution starts up". In the list at the right, select the line
"revPreOpenStack".
Then in your library stack, change your preOpenStack handler to a
"revPreOpenstack" handler.
LiveCode will now automatically open your stack at every launch, and
send a "revPreOpenstack" message to it. The library will load whenever
the IDE opens.
>
> I can't get the 'start using stack "EIS_Library"' to work on Android. I
> included the library stack in the standalone application setting in the
> stacks tab. This also makes it appear in the property inspector "stack
> files" when inspecting the main app stack.
>
> I hit the test button to the test on the device and the "start using stack
> "EIS_Library" throws an error.
I'd think that should work, but mobile may not be interpreting the file
locations the same way as the desktop apps do. On mobile, many of the
file folders are virtual.
Instead of including it in the stacks pane, try including it in the Copy
Files pane. The stack will be copied to the same folder as the engine in
your mobile standalone. You can refer to it in your scripts with an
engine-relative file path, and start using that:
put specialFolderPath("engine") & "/EIS_Library.livecode" into tPath
start using stack tPath
Untested, but should work.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list