More weirdness
Peter Haworth
pete at lcsql.com
Fri Sep 28 19:52:04 EDT 2012
Thanks for the suggestions.
I painstakingly went through my code starting at the last line and working
back from there, setting a red dot breakpoint on each line, then seeing if
that point was reached.
I finally discovered that the last line of code that
is executed successfully is "go stack tStack", where tStack contains a
valid file path as returned in the it variable after the user selects a
file from a dialog.
WIth a red dot breakpoint on that statement, the break happens and when I
click the green arrow, all works fine. If I put a red dot breakpoint on
the very next line, it doesn't break and no further code is executed. In
both cases, the stack is opened OK.
SInce I remember that it is sometimes the next statement that is causing
a problem in these situations, it is "set the defaultstack to "xyz", which
is the stack containing the button whose script is being executed.
I should say that I have now duplicated this when the stack is running
toplevel, not as a modeless plugin. And also that there was a front
script involved which could have potentially affected things but I removed
the front script and the problem remained.
Any further thoughts most welcome!
Pete
lcSQL Software <http://www.lcsql.com>
On Thu, Sep 27, 2012 at 7:39 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:
> On 9/27/12 8:18 PM, Peter Haworth wrote:
>
> When I run the stack toplevel, all works fine.
>>
>> When I run the stack as a plugin without the breakpoint, the scrolling
>> list
>> field is not populated, no runtime error, no indication of any error of
>> any
>> sort. With the breakpoint, everything works perfectly. I can even replace
>> the breakpoint with a put command to display something in the message box
>> and that makes it work also.
>>
>> But even that's not the weird part. Once I have made the thing work using
>> a breakpoint or a put, I can take that code out and all works fine!!!! At
>> least in the current run of the stack. Restarting LC and loading the
>> plugin
>> again takes me back to the non-working scenario.
>>
>
> Sounds like the defaultstack is being reset, or not being set in the first
> place. What's in the result when it fails?
>
> --
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
>
> ______________________________**_________________
> 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<http://lists.runrev.com/mailman/listinfo/use-livecode>
>
More information about the use-livecode
mailing list