A compile problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
A compile problem
Years ago I developed a peculiar type of database app in livecode.
It compiles fine in the 7.1 version, there is an issue in 8.1.10 and drops dead in 9.0
I attach the livecode stack in case anyone wants to help me cure the problem, whatever it is.
NB, there is a bug in the text handling with 7.1 that isn't there in earlier versions of livecode. I hope to correct this, provided I can compile it in the latest version of livecode.
Any takers?
It compiles fine in the 7.1 version, there is an issue in 8.1.10 and drops dead in 9.0
I attach the livecode stack in case anyone wants to help me cure the problem, whatever it is.
NB, there is a bug in the text handling with 7.1 that isn't there in earlier versions of livecode. I hope to correct this, provided I can compile it in the latest version of livecode.
Any takers?
- Attachments
-
- Contact Manager V9 20-4-2018.zip
- (24.23 KiB) Downloaded 181 times
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: A compile problem
I'm on a phone right now, but can you tell us what the error is? Normally the compilation error dialog will take you right to it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: A compile problem
Hello Richard, Version 9. The empty files are created and after several progress dialogs, it gets as far as closing stacks and the dialog box disappears. As I said, it dies on the spot. This is in the latest version of LC.
Version 8 LC did finish this time.
Any ideas?
Version 8 LC did finish this time.
Any ideas?
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: A compile problem
Ah, thanks. Script compilation errors provide more detail. This build issue just seems like a bug.
What's the target platform?
What's the target platform?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: A compile problem
The platform is windows.
Thanks for your help so far.
Thanks for your help so far.
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: A compile problem
Hello ajperks,
In LC 9.0, when building a standalone the messages are no longer locked, so the mainstack does receive messages. This is mentioned and explained in detail in the Release Notes, in the "Breaking Changes" section.
Your stack has a handler:
So since this message is sent when building a standalone, LiveCode quits, as expected.
To fix this problem, you can modify this handler as follows:
Best,
Panos
--
In LC 9.0, when building a standalone the messages are no longer locked, so the mainstack does receive messages. This is mentioned and explained in detail in the Release Notes, in the "Breaking Changes" section.
Your stack has a handler:
Code: Select all
on closeStack
quit
end closeStack
To fix this problem, you can modify this handler as follows:
Code: Select all
on closeStack
if the mode of stack "revStandaloneProgress" > 0 then
exit closeStack
end if
quit
end closeStack
Panos
--
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: A compile problem
Thanks, Panos.
1. Why would not looking messages prevent the SB from succeeding without notice?
2. Is there any internal discussion of moving the SB to a separate process to make all these complications go away?
1. Why would not looking messages prevent the SB from succeeding without notice?
2. Is there any internal discussion of moving the SB to a separate process to make all these complications go away?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: A compile problem
Thank you Panos and all for your help and advice. I will have the opportunity in a couple of day's time to try this out.
I am sure this will work.
I certainly would never have found this issue without your help. It makes it worthwhile sorting out the other bugs that have crept in with successive upgraded versions.
If I don't continue this thread, please know I am happy now.
I am sure this will work.
I certainly would never have found this issue without your help. It makes it worthwhile sorting out the other bugs that have crept in with successive upgraded versions.
If I don't continue this thread, please know I am happy now.
-
- Livecode Staff Member
- Posts: 818
- Joined: Fri Feb 06, 2015 4:03 pm
Re: A compile problem
@Richard,
1. The standalone builder has always needed to close the stacks it builds for reasons pretty deeply ingrained in the code. However this causes a few problems, for example:
- values in script locals become empty
- behaviors are broken when the parent script is on / in a stack which closes
As an attempt to improve this situation, the code that locks messages when closing and opening stacks for standalone builds has been removed. This means that where previously mainstacks would not receive openStack and closeStack messages during standalone build, they now do. So if you have a call to "quit" in the closeStack handler, LC will quit. This can be prevented by exiting these handlers if a standalone build is in progress. To check that:
2. Yes, that would be ideal. We had discussed refactoring the S/B in the past, but it requires an amount of work, so I don't see it happening in the near future.
@ajperks
You are welcome
Best,
Panos
--
1. The standalone builder has always needed to close the stacks it builds for reasons pretty deeply ingrained in the code. However this causes a few problems, for example:
- values in script locals become empty
- behaviors are broken when the parent script is on / in a stack which closes
As an attempt to improve this situation, the code that locks messages when closing and opening stacks for standalone builds has been removed. This means that where previously mainstacks would not receive openStack and closeStack messages during standalone build, they now do. So if you have a call to "quit" in the closeStack handler, LC will quit. This can be prevented by exiting these handlers if a standalone build is in progress. To check that:
Code: Select all
on closeStack
if the mode of stack "revStandaloneProgress" > 0 then
exit closeStack
end if
...
...
end closeStack
@ajperks
You are welcome
Best,
Panos
--
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: A compile problem
@panos
Just a question.
Why can’t something like ...
Just a question.
Why can’t something like ...
Be built into the standalone builder scripts?on closeStack
if the mode of stack "revStandaloneProgress" > 0 then
exit closeStack
end if
Re: A compile problem
Or even lock messages when closing the stacks and then unlock when re-opening so that the behaviors get established properly...
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: A compile problem
Hi All,
I get an error on IDE (LC 9.0.1)
Best regards
Jean-Marc
I get an error on IDE (LC 9.0.1)
so i added some lines to avoid this:can't find stack
Code: Select all
on closeStack
if there is a stack "revStandaloneProgress" then
if the mode of stack "revStandaloneProgress" > 0 then
exit closeStack
end if
else
pass closeStack
end if
end closeStack
Jean-Marc
https://alternatic.ch