Re: Weird crash when stack is in use

2016-01-02 Thread Peter M. Brigham
Don't know about your crashing problem, but the reason the library stack script 
can't find the function handler in the main stack is that it's in the wrong 
place in the message path. From the LC dictionary:

The start using command places a stack's script into the message path *after* 
the current stack and before any objects in the backScripts. [emphasis added]

You could consider calling the function using the value() function -- look it 
up.

put value(myFunction(x,y,z), stack "myMainStack") into functionOutput

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


On Jan 1, 2016, at 12:50 PM, William Prothero wrote:

> Folks:
> First, Happy New Year. I’ve gotten obsessed with a very odd crash that’s 
> stopping my progress, so here it is.
> 
> I am on Mac El-Capitan 10.11.2 and Livecode 7.1. I have a splash stack that 
> launches my main stack, which has several substacks. When I load my main 
> stack, I “start using “ all of the library stacks that I need. There is a 
> handler in one of the library stacks that calls a script in the main stack’s 
> stack script. This script (in the library stack) can’t find the handler in 
> the stack that calls it. So, I tried to “start using “ the main stack. This 
> crashes livecode. 
> 
> Is it bad practice to “start using “ the main application stack? When I look 
> at “the target”, I get the reference to the button where the action was 
> initiated, but the IDE says that it can’t find the handler.
> 
> Here’s the sequence:
> 
> --Launch splash app
> 
> —button click on splash app opens the main app
> 
> —script in cd 1 initializes the main app and “starts using” the library apps 
> and substacks
> 
> Resut: If, in the initialization routine (in the card script of card 1 of the 
> main app), I do:
> 
> put the name of this stack into sName
> if not (the stacksinuse contains sName) then
>start using sName
> end if
> 
> —result: livecode crashes. No error messages, just disappears.
> 
> If I don’t put the above statements in the initialization routine, LC does 
> not crash, but then
> handlers in one of the library stacks can’t find the function handler in the 
> main app stack script.
> 
> ?? This is quite frustrating and caps of a day of tedious coding that I 
> thought was finished, until this problem surfaced. Livecode crashes without 
> any dialog, error report. It just disappears.
> 
> Any suggestions would be much appreciated.
> Best,
> Bill
> 
> William Prothero, Ph.D.
> University of California, Santa Barbara, Emeritus
> proth...@earthednet.org
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Weird crash when stack is in use

2016-01-01 Thread William Prothero
FYI, I made a test stack where the destination stack’s only script was the 
“start using” script referred to below. Livecode did not crash. I don’t know 
why it crashes my app, but I will investigate further to try and pin down the 
source, over the next day or so.
Bill

> On Jan 1, 2016, at 9:50 AM, William Prothero  wrote:
> 
> Folks:
> First, Happy New Year. I’ve gotten obsessed with a very odd crash that’s 
> stopping my progress, so here it is.
> 
> I am on Mac El-Capitan 10.11.2 and Livecode 7.1. I have a splash stack that 
> launches my main stack, which has several substacks. When I load my main 
> stack, I “start using “ all of the library stacks that I need. There is a 
> handler in one of the library stacks that calls a script in the main stack’s 
> stack script. This script (in the library stack) can’t find the handler in 
> the stack that calls it. So, I tried to “start using “ the main stack. This 
> crashes livecode. 
> 
> Is it bad practice to “start using “ the main application stack? When I look 
> at “the target”, I get the reference to the button where the action was 
> initiated, but the IDE says that it can’t find the handler.
> 
> Here’s the sequence:
> 
> --Launch splash app
> 
> —button click on splash app opens the main app
> 
> —script in cd 1 initializes the main app and “starts using” the library apps 
> and substacks
> 
> Resut: If, in the initialization routine (in the card script of card 1 of the 
> main app), I do:
> 
> put the name of this stack into sName
> if not (the stacksinuse contains sName) then
>start using sName
> end if
> 
> —result: livecode crashes. No error messages, just disappears.
> 
> If I don’t put the above statements in the initialization routine, LC does 
> not crash, but then
> handlers in one of the library stacks can’t find the function handler in the 
> main app stack script.
> 
> ?? This is quite frustrating and caps of a day of tedious coding that I 
> thought was finished, until this problem surfaced. Livecode crashes without 
> any dialog, error report. It just disappears.
> 
> Any suggestions would be much appreciated.
> Best,
> Bill
> 
> William Prothero, Ph.D.
> University of California, Santa Barbara, Emeritus
> proth...@earthednet.org
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode