Start using remote stack

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Start using remote stack

J. Landman Gay
I have a script-only stack on a server I want to use as a library. The
handler does this:

get "https://www.domain.com/folder/stack.livecodescript"
start using stack it

The text file comes in fine and the text content is in the "it"
variable. When the "start using" line executes, I get the error "can't
find stack".

Shouldn't this work?  LC 8.2.1 rc 2.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Mike Bonner
By using get its just text in the it variable.  I wonder if you can-- start
using stack URL "https://youraddress.com/folder/stack.livecodescript"
 (just like go, but start using instead)

On Sun, Dec 11, 2016 at 1:55 PM, J. Landman Gay <[hidden email]>
wrote:

> I have a script-only stack on a server I want to use as a library. The
> handler does this:
>
> get "https://www.domain.com/folder/stack.livecodescript"
> start using stack it
>
> The text file comes in fine and the text content is in the "it" variable.
> When the "start using" line executes, I get the error "can't find stack".
>
> Shouldn't this work?  LC 8.2.1 rc 2.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
The handler is doing basically the same thing, I just put the string
into a variable first. But originally I used your method and got the
same error.

I also tried:

put url "https:blah blah" into tFile
start using stack tFile

Same error.

On 12/11/16 3:09 PM, Mike Bonner wrote:

> By using get its just text in the it variable.  I wonder if you can-- start
> using stack URL "https://youraddress.com/folder/stack.livecodescript"
>  (just like go, but start using instead)
>
> On Sun, Dec 11, 2016 at 1:55 PM, J. Landman Gay <[hidden email]>
> wrote:
>
>> I have a script-only stack on a server I want to use as a library. The
>> handler does this:
>>
>> get "https://www.domain.com/folder/stack.livecodescript"
>> start using stack it
>>
>> The text file comes in fine and the text content is in the "it" variable.
>> When the "start using" line executes, I get the error "can't find stack".
>>
>> Shouldn't this work?  LC 8.2.1 rc 2.
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email]
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Mike Bonner
oh DOH.  Yep I see what you did there.

I can't get it to work here either, but if you go to the stack invisible,
THAT works.  Then you can start using it.  Does seem like it should work.

On Sun, Dec 11, 2016 at 3:29 PM, J. Landman Gay <[hidden email]>
wrote:

> The handler is doing basically the same thing, I just put the string into
> a variable first. But originally I used your method and got the same error.
>
> I also tried:
>
> put url "https:blah blah" into tFile
> start using stack tFile
>
> Same error.
>
>
> On 12/11/16 3:09 PM, Mike Bonner wrote:
>
>> By using get its just text in the it variable.  I wonder if you can--
>> start
>> using stack URL "https://youraddress.com/folder/stack.livecodescript"
>>  (just like go, but start using instead)
>>
>> On Sun, Dec 11, 2016 at 1:55 PM, J. Landman Gay <[hidden email]
>> >
>> wrote:
>>
>> I have a script-only stack on a server I want to use as a library. The
>>> handler does this:
>>>
>>> get "https://www.domain.com/folder/stack.livecodescript"
>>> start using stack it
>>>
>>> The text file comes in fine and the text content is in the "it" variable.
>>> When the "start using" line executes, I get the error "can't find stack".
>>>
>>> Shouldn't this work?  LC 8.2.1 rc 2.
>>>
>>> --
>>> Jacqueline Landman Gay         |     [hidden email]
>>> HyperActive Software           |     http://www.hyperactivesw.com
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

mwieder
In reply to this post by J. Landman Gay
On 12/11/2016 12:55 PM, J. Landman Gay wrote:

> I have a script-only stack on a server I want to use as a library. The
> handler does this:
>
> get "https://www.domain.com/folder/stack.livecodescript"
> start using stack it
>
> The text file comes in fine and the text content is in the "it"
> variable. When the "start using" line executes, I get the error "can't
> find stack".
>
> Shouldn't this work?  LC 8.2.1 rc 2.
>

Here "it" is the stack script, not the stack, so stack "it" doesn't exist.

--
  Mark Wieder
  [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
On 12/11/16 9:51 PM, Mark Wieder wrote:

> On 12/11/2016 12:55 PM, J. Landman Gay wrote:
>> I have a script-only stack on a server I want to use as a library. The
>> handler does this:
>>
>> get "https://www.domain.com/folder/stack.livecodescript"
>> start using stack it
>>
>> The text file comes in fine and the text content is in the "it"
>> variable. When the "start using" line executes, I get the error "can't
>> find stack".
>>
>> Shouldn't this work?  LC 8.2.1 rc 2.
>>
>
> Here "it" is the stack script, not the stack, so stack "it" doesn't exist.
>

Yes, sorry, you're right. That was the tail end of any number of things
I tried. I started out with:

start using stack url
"https://www.domain.com/folder/myScript.livecodescript"

And then tried a bunch of other things which all failed with "can't find
stack".

So I tried plain old "go stack url <url>" and got "error in statement".
It's an https URL on Dropbox, and a script-only stack besides. Maybe one
of those things matters.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
On 12/12/16 12:56 AM, J. Landman Gay wrote:
> So I tried plain old "go stack url <url>" and got "error in statement".
> It's an https URL on Dropbox, and a script-only stack besides. Maybe one
> of those things matters.

It looks like script-only stacks don't work remotely. I made a new
binary stack and popped in the same script, saved it to Dropbox, and it
works fine with "start using" and/or "go".

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
On 12/12/16 1:10 AM, J. Landman Gay wrote:
> On 12/12/16 12:56 AM, J. Landman Gay wrote:
>> So I tried plain old "go stack url <url>" and got "error in statement".
>> It's an https URL on Dropbox, and a script-only stack besides. Maybe one
>> of those things matters.
>
> It looks like script-only stacks don't work remotely. I made a new
> binary stack and popped in the same script, saved it to Dropbox, and it
> works fine with "start using" and/or "go".
>

Correction: I have to "go" before I can "start using". Like Mike Bonner
said. Hmph.

Nothing works with script-only stacks.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

pink
Since "it" is the downloaded script, what if you tried this with a hidden button:

get "https://www.domain.com/folder/stack.livecodescript"
set the script of button "hiddenGems" to it
insert the script of button "hiddenGems" into front

---
Greg (pink) Miller
mad, pink and dangerous to code
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

mwieder
On 12/12/2016 03:38 AM, pink wrote:
> Since "it" is the downloaded script, what if you tried this with a hidden
> button:
>
> get "https://www.domain.com/folder/stack.livecodescript"
> set the script of button "hiddenGems" to it
> insert the script of button "hiddenGems" into front

Heh. I need caffeine.
I read that as "hiddenGerms"...

--
  Mark Wieder
  [hidden email]



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Richard Gaskin
In reply to this post by J. Landman Gay
J. Landman Gay wrote:

 > Correction: I have to "go" before I can "start using". Like Mike
 > Bonner said. Hmph.

When I was first setting up my "streaming app" framework years ago I did
extensive testing with using a library downloaded from a server.

Ultimately the best I could come up with was to "go" to it invisibly,
then I could use "start using" with it.

Might be nice if "start using" also invoked the same unpacking that "go"
does so we could do this more directly, but with so many other things on
queue I didn't file an enhancement request for that.

 > Nothing works with script-only stacks.

IMO that would be a bug.  The design goal of script-only stacks is to
provide syntax compatibility with binary stacks, where the only
difference is the storage format.

Given that, it would seem reasonable that if you can download, go, and
then start using a binary stack as a library, you should be able to do
the same with a script-only stack.

Probably just and oversight, and I'd guess not hard to fix.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
In reply to this post by pink
On 12/12/16 5:38 AM, pink wrote:
> Since "it" is the downloaded script, what if you tried this with a hidden
> button:
>
> get "https://www.domain.com/folder/stack.livecodescript"
> set the script of button "hiddenGems" to it
> insert the script of button "hiddenGems" into front


That would probably work, but the objective was to avoid putting scripts
into a stack at all. What I'm aiming for is a universal library with
specialized development handlers which any stack I'm working on can use.
I put it into Dropbox because I want it in a centralized location
available from any machine or mobile device (any server would work though.)

But it may come down to something like you suggest, though turning the
script into a binary stack seems to work. Unfortunately I have to "go"
there first and that seems to crash on Android with my current setup.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Mike Bonner
I haven't tried it but, perhaps you could-- put url "
https://www.domain.com/folder/stack.livecodescript" into url ("binfile:" &
specialfolderpath("temp") & "/thestack.livecodescript"
Then start using it from there.

On Mon, Dec 12, 2016 at 9:52 PM, J. Landman Gay <[hidden email]>
wrote:

> On 12/12/16 5:38 AM, pink wrote:
>
>> Since "it" is the downloaded script, what if you tried this with a hidden
>> button:
>>
>> get "https://www.domain.com/folder/stack.livecodescript"
>> set the script of button "hiddenGems" to it
>> insert the script of button "hiddenGems" into front
>>
>
>
> That would probably work, but the objective was to avoid putting scripts
> into a stack at all. What I'm aiming for is a universal library with
> specialized development handlers which any stack I'm working on can use. I
> put it into Dropbox because I want it in a centralized location available
> from any machine or mobile device (any server would work though.)
>
> But it may come down to something like you suggest, though turning the
> script into a binary stack seems to work. Unfortunately I have to "go"
> there first and that seems to crash on Android with my current setup.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
On 12/12/16 11:08 PM, Mike Bonner wrote:
> I haven't tried it but, perhaps you could-- put url "
> https://www.domain.com/folder/stack.livecodescript" into url ("binfile:" &
> specialfolderpath("temp") & "/thestack.livecodescript"
> Then start using it from there.

Hey, it works! Binary or script-only stack both. Clever. :)

Thank you.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Mike Bonner
Still hope they fix it so the other way works, but any workaround in a
storm.

On Mon, Dec 12, 2016 at 10:39 PM, J. Landman Gay <[hidden email]>
wrote:

> On 12/12/16 11:08 PM, Mike Bonner wrote:
>
>> I haven't tried it but, perhaps you could-- put url "
>> https://www.domain.com/folder/stack.livecodescript" into url ("binfile:"
>> &
>> specialfolderpath("temp") & "/thestack.livecodescript"
>> Then start using it from there.
>>
>
> Hey, it works! Binary or script-only stack both. Clever. :)
>
> Thank you.
>
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

mwieder
In reply to this post by J. Landman Gay
On 12/12/2016 09:39 PM, J. Landman Gay wrote:
> On 12/12/16 11:08 PM, Mike Bonner wrote:
>> I haven't tried it but, perhaps you could-- put url "
>> https://www.domain.com/folder/stack.livecodescript" into url
>> ("binfile:" &
>> specialfolderpath("temp") & "/thestack.livecodescript"
>> Then start using it from there.
>
> Hey, it works! Binary or script-only stack both. Clever. :)

But... sputter... I thought you were trying to avoid putting it into a
stack...

--
  Mark Wieder
  [hidden email]



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Richard Gaskin
In reply to this post by J. Landman Gay
J. Landman Gay wrote:

 > On 12/12/16 11:08 PM, Mike Bonner wrote:
 >> I haven't tried it but, perhaps you could-- put url "
 >> https://www.domain.com/folder/stack.livecodescript" into url
("binfile:" &
 >> specialfolderpath("temp") & "/thestack.livecodescript"
 >> Then start using it from there.
 >
 > Hey, it works! Binary or script-only stack both. Clever. :)

If a binary stack can be used from memory only, it should not be
necessary to write a script-only stack to disk.

Such a requirement prevents us from using script-only stacks in secure
zero-footprint apps, such as those with the securityPermissions for
"disk" turned off.

If you haven't filed a bug report I cam do that.

I think it's useful to report any behavioral differences between
script-only and binary stacks, as they break the cardinal design mandate
that the only difference be the storage format.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
In reply to this post by mwieder
Ideally there would be nothing on disk,. But the, main goal was to keep all
my development and testing handlers out of the working stack. So writing
the stack to disk isn't horrible though it wasn't my original intention.

Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On December 13, 2016 12:47:28 AM Mark Wieder <[hidden email]> wrote:

> On 12/12/2016 09:39 PM, J. Landman Gay wrote:
>> On 12/12/16 11:08 PM, Mike Bonner wrote:
>>> I haven't tried it but, perhaps you could-- put url "
>>> https://www.domain.com/folder/stack.livecodescript" into url
>>> ("binfile:" &
>>> specialfolderpath("temp") & "/thestack.livecodescript"
>>> Then start using it from there.
>>
>> Hey, it works! Binary or script-only stack both. Clever. :)
>
> But... sputter... I thought you were trying to avoid putting it into a
> stack...
>
> --
>   Mark Wieder
>   [hidden email]
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

J. Landman Gay
In reply to this post by Richard Gaskin
On 12/13/16 9:43 AM, Richard Gaskin wrote:
> If a binary stack can be used from memory only, it should not be
> necessary to write a script-only stack to disk.
>
> Such a requirement prevents us from using script-only stacks in secure
> zero-footprint apps, such as those with the securityPermissions for
> "disk" turned off.
>
> If you haven't filed a bug report I cam do that.

If you have time I'd appreciate it. I've submitted a few reports lately
and the time it takes to test and set up a test stack is not
insignificant. I'm also not sure yet whether the issue is related to my
stack setup or if it's universal everywhere so that would need testing
too. Right now I'm in a crunch, so if you feel like checking it out
that'd be great.

Otherwise it will have to wait a while until I get freed up.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Start using remote stack

Richard Gaskin
J. Landman Gay wrote:

 > On 12/13/16 9:43 AM, Richard Gaskin wrote:
 >> If a binary stack can be used from memory only, it should not be
 >> necessary to write a script-only stack to disk.
 >>
 >> Such a requirement prevents us from using script-only stacks in
 >> secure zero-footprint apps, such as those with the
 >> securityPermissions for "disk" turned off.
 >>
 >> If you haven't filed a bug report I cam do that.
 >
 > If you have time I'd appreciate it. I've submitted a few reports
 > lately and the time it takes to test and set up a test stack is
 > not insignificant. I'm also not sure yet whether the issue is
 > related to my stack setup or if it's universal everywhere so
 > that would need testing too. Right now I'm in a crunch, so if
 > you feel like checking it out that'd be great.

I depend heavily on streaming apps and would like to move some parts to
script-only stacks, so this is important to me.

While setting up a test scenario I discovered a much simpler recipe,
included in the report I just filed:

http://quality.livecode.com/show_bug.cgi?id=18998

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode