Standalone issue ... was starting the Project Browser

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

Standalone issue ... was starting the Project Browser

Geoff Canyon via use-livecode
I've changed the subject line (from Re: starting the Project Browser) to reflect this discussion more accurately.

If that's true then there's (sigh!) one more reason to stay away from LC v9... but I really don't understand the reason why this is necessary in the first place.  I've never had a standalone fail with a "can't find stack" error:

from http://runtime-revolution.278305.n4.nabble.com/Standalone-build-workaround-td4728140.html#a4728141

"... when you open the stack for the first time (without having built a
standalone before), the stack "revStandaloneProgress" is not loaded yet
(thus the "can't find stack error)...."

So, does this situation only occur for the first standalone build?  Not the second time?  What is implied should be done if one of the conditions in the function is false? .... very confusing!!!

I guess I was looking for something more specific about where to put this "fix":

e.g.

In an openStack call, you'd put this ... where?  At the end of the code just before the "end openStack"? (that's where I put it):

     if isBuildingStandalone() then
          exit openstack
     end if

and have the following function call accessible to call cards (i.e. in the stack)?

function isBuildingStandalone
     return the environment is "development" AND \
           there is a stack "revStandaloneProgress" AND \
     the mode of stack "revStandaloneProgress" > 0
end isBuildingStandalone


My question, then, is do I have to have a similar "if isBuildingStandalone()" call in all the "opens" and "closes" you list (and others) and do I "exit" the call if isBuildingStandalone() returns "true"?

WOW! ... if THAT's needed then I can't imagine anyone editing all of their code to do this!!!

Douglas Ruisaard
Trilogy Software
(250) 573-3935


>
> It's referring to all engine messages that contain either "open" or "close", so:
>
> preOpenStack
> preOpenBackground
> preOpenCard
> ...etc
> openStack
> openBackground
> openCard
> ...etc
> closeStack
> closeBackground
> closeCard
> ...etc
>
> I understand why this is necessary now, but it is pretty instrusive, is going to bite a lot of people,
> and clutters up scripts. I'd like to see some sort of toggle where we could use the older method if
> there is no problem doing that.
>
> On 10/26/18 11:20 AM, Douglas Ruisaard via use-livecode wrote:
> > Thanks, Jacqueline.
> >
> > I have not had any issues with using the StandAlone builder but then I am using LC v8.1.9. on
> Windows 7.  I did put Panos's code into my app ... made no apparent difference but good to have there
> anyway.
> >
> > I'm a bit confused about the reference to "Similar in all other (pre)open*/close* messages." ...
> what is being recommended here (I get the "preOpen" bit) .. but the reference to the "close" I don't
> get ... some other function call??
>
>
> --
> 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: Standalone issue ... was starting the Project Browser

Geoff Canyon via use-livecode
If your code does things that break when called as a part of the build process, then you need to check and exit the handler before the code executes. Putting it at the end of the handler is not needed. If needed, it probably needs to go toward the top of the handler.

When the IDE first launches, the revStandaloneProgress stack is not loaded. After you build any project, then it will remain in memory for the rest of the session.

Thanks,
Brian
On Oct 27, 2018, 10:26 AM -0500, Douglas Ruisaard via use-livecode <[hidden email]>, wrote:

> I've changed the subject line (from Re: starting the Project Browser) to reflect this discussion more accurately.
>
> If that's true then there's (sigh!) one more reason to stay away from LC v9... but I really don't understand the reason why this is necessary in the first place. I've never had a standalone fail with a "can't find stack" error:
>
> from http://runtime-revolution.278305.n4.nabble.com/Standalone-build-workaround-td4728140.html#a4728141
>
> "... when you open the stack for the first time (without having built a
> standalone before), the stack "revStandaloneProgress" is not loaded yet
> (thus the "can't find stack error)...."
>
> So, does this situation only occur for the first standalone build? Not the second time? What is implied should be done if one of the conditions in the function is false? .... very confusing!!!
>
> I guess I was looking for something more specific about where to put this "fix":
>
> e.g.
>
> In an openStack call, you'd put this ... where? At the end of the code just before the "end openStack"? (that's where I put it):
>
> if isBuildingStandalone() then
> exit openstack
> end if
>
> and have the following function call accessible to call cards (i.e. in the stack)?
>
> function isBuildingStandalone
> return the environment is "development" AND \
> there is a stack "revStandaloneProgress" AND \
> the mode of stack "revStandaloneProgress" > 0
> end isBuildingStandalone
>
>
> My question, then, is do I have to have a similar "if isBuildingStandalone()" call in all the "opens" and "closes" you list (and others) and do I "exit" the call if isBuildingStandalone() returns "true"?
>
> WOW! ... if THAT's needed then I can't imagine anyone editing all of their code to do this!!!
>
> Douglas Ruisaard
> Trilogy Software
> (250) 573-3935
>
>
> >
> > It's referring to all engine messages that contain either "open" or "close", so:
> >
> > preOpenStack
> > preOpenBackground
> > preOpenCard
> > ...etc
> > openStack
> > openBackground
> > openCard
> > ...etc
> > closeStack
> > closeBackground
> > closeCard
> > ...etc
> >
> > I understand why this is necessary now, but it is pretty instrusive, is going to bite a lot of people,
> > and clutters up scripts. I'd like to see some sort of toggle where we could use the older method if
> > there is no problem doing that.
> >
> > On 10/26/18 11:20 AM, Douglas Ruisaard via use-livecode wrote:
> > > Thanks, Jacqueline.
> > >
> > > I have not had any issues with using the StandAlone builder but then I am using LC v8.1.9. on
> > Windows 7. I did put Panos's code into my app ... made no apparent difference but good to have there
> > anyway.
> > >
> > > I'm a bit confused about the reference to "Similar in all other (pre)open*/close* messages." ...
> > what is being recommended here (I get the "preOpen" bit) .. but the reference to the "close" I don't
> > get ... some other function call??
> >
> >
> > --
> > 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: Standalone issue ... was starting the Project Browser

Geoff Canyon via use-livecode
In reply to this post by Geoff Canyon via use-livecode
On 10/27/18 10:26 AM, Douglas Ruisaard via use-livecode wrote:
> If that's true then there's (sigh!) one more reason to stay away from LC v9... but I really don't understand the reason why this is necessary in the first place.  I've never had a standalone fail with a "can't find stack" error:

If your builds are going smoothly you don't have to change anything. Try
it in LC 9 and see. The problem only occurs if any "open" or "close"
handlers do something that interferes or throws errors.

> So, does this situation only occur for the first standalone build?  Not the second time?  What is implied should be done if one of the conditions in the function is false? .... very confusing!!!

A "can't find stack" used to occur the first time you build during any
one session. The updated handler check fixes this so you don't need to
worry about it any more.

>
> I guess I was looking for something more specific about where to put this "fix":
>
> e.g.
>
> In an openStack call, you'd put this ... where?  At the end of the code just before the "end openStack"? (that's where I put it):
>
>       if isBuildingStandalone() then
>            exit openstack
>       end if

The idea is that this fix will prevent the handler from executing at
all, so it needs to be at the very front of the handler, right after the
"on <handlername>" line.

> My question, then, is do I have to have a similar "if isBuildingStandalone()" call in all the "opens" and "closes" you list (and others) and do I "exit" the call if isBuildingStandalone() returns "true"?
>
> WOW! ... if THAT's needed then I can't imagine anyone editing all of their code to do this!!!

Yes, that's what the additional lines do -- exit the handler before it
can run. And I agree that this is an issue for some apps. The problem it
tries to solve is retention of script local variable values, as well as
preventing unnecessary handlers from running. But I'd rather
reinitialize things when necessary than to add extra lines to so many
engine messages.

I'd be happy with a simple toggle that lets me turn on lockmessages
before building. I've been accomodating that behavior for years.

--
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: Standalone issue ... was starting the Project Browser

Geoff Canyon via use-livecode
That interferes with the standalone builder, specifically auto detecting addons/plugins. It may cause other issues as well. It's a catch 22.

Bob S


> On Oct 27, 2018, at 12:56 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> I'd be happy with a simple toggle that lets me turn on lockmessages before building. I've been accomodating that behavior for years.


_______________________________________________
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