getting zero k file when using put url binfile in standalone app

Mike Bonner bonnmike at gmail.com
Sun Feb 5 11:10:57 EST 2012


specialfolderpath("engine") is ios and android only. You'll need to check
the running environment and then if its ios use engine if not use another
method. If I recall correctly, "the filename of this stack" gives you the
stack location, set the itemdelimiter to slash, lop off the last item and
go from there. (No mac so can't try it to try and remember the exact
mechanics)

On Sun, Feb 5, 2012 at 8:49 AM, Colin Holgate <coiin at verizon.net> wrote:

> I'm trying this as a script in one mainstack, with the goal being to
> create and jump into a copy of another stack:
>
> on openstack
>   set the defaultFolder to specialFolderPath("Documents")
>   if there is not a file "AppStack.livecode" then
>      put specialFolderPath("engine") & "/AppStack.livecode" into masterfile
>      put specialFolderPath("Documents") & "/AppStack.livecode" into appfile
>      put URL ("binfile:" & masterfile) into URL ("binfile:" & appfile)
>   end if
>   go stack specialFolderPath("Documents") & "/AppStack.livecode"
> end openstack
>
> The "AppStack.livecode" file is included in Copy Files. If I run it as
> iOS, everything is fine, but trying it in LiveCode, or as a standalone app,
> and the "documents" version of AppStack.livecode is created as a zero k
> file. Trying to do the go stack line gives a result that says the stack is
> corrupted. I can see in the standalone package that AppStack.livecode is in
> the Mac OS resources folder. Its file size is smaller than the original
> stack, but it's a lot more than zero k.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list