Having trouble building an app
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Having trouble building an app
I have something that is probably hugely relevant to this and may be the answer to this question.
I have been looking at the icons on these stack and while they appear to be LC icons, all of the files that I have described as working and the successful apps I have built with them as I described are all .Rev files.
I had thought that at least one of the latest were LC files.
So it seems me that LC didn't keep the option to build this way, which to me begs the question "Why have a setting "Move Substacks into individual stackfiles""?
I still have have of the examples I had intended to send, but now wonder if the super heroes of LC would be interested in seeing Revolution files.
I really did believe that all of Revolution had been included in LC.
I have been looking at the icons on these stack and while they appear to be LC icons, all of the files that I have described as working and the successful apps I have built with them as I described are all .Rev files.
I had thought that at least one of the latest were LC files.
So it seems me that LC didn't keep the option to build this way, which to me begs the question "Why have a setting "Move Substacks into individual stackfiles""?
I still have have of the examples I had intended to send, but now wonder if the super heroes of LC would be interested in seeing Revolution files.
I really did believe that all of Revolution had been included in LC.
Re: Having trouble building an app
I'm not sure I understand the question here, if you have one.
If your asking about a historical view of the IDE, it started as MetaCard, which was later (around vers. 2.5) bought by RuntimeRevolution Ltd., which was shortened to Revolution, which then changed to LiveCode (around version 4.5 or so).
Each IDE creates stacks with the extension of the name of the IDE at the time, i.e. -
Metacard = extension .mc
Revolution = extension .rev
LiveCode = extension .livecode
MetaCard can only open .mc files (either developed in the Mc IDE, or files with the extension from the earliest Rev IDE renamed to .mc).
Every IDE from there on can open files from the previous IDE(s), and all IDE(s) can save backwards for several iterations.
Of course, the catch on saving backwards is that if you were using features introduced *after* the version you are saving backwards too, those features of course will not work with the older engine. Also, you may have to save backwards in steps as well, i.e. -
The current IDE (9.6) I believe has problems saving backwards past vers. 7.x (unconfirmed, this is my suspicion).
With 7.x., I would not try to save backwards past 5.5.
with 5.5, it should** be possible to save back to 2.x.
I've never tried going pas that, so caveat emptor
To sum up, as far as I know, you should have no problem compiling any file with a .rev extension from the current Lc IDE.
- a few caveats to the above -
I work mostly in the ancient MetaCard IDE, not the current one.
I do use the current one on rare occasions to test my theories, or to answer questions about the new IDE specifically, or to test for bugs. YMMV.
If your asking about a historical view of the IDE, it started as MetaCard, which was later (around vers. 2.5) bought by RuntimeRevolution Ltd., which was shortened to Revolution, which then changed to LiveCode (around version 4.5 or so).
Each IDE creates stacks with the extension of the name of the IDE at the time, i.e. -
Metacard = extension .mc
Revolution = extension .rev
LiveCode = extension .livecode
MetaCard can only open .mc files (either developed in the Mc IDE, or files with the extension from the earliest Rev IDE renamed to .mc).
Every IDE from there on can open files from the previous IDE(s), and all IDE(s) can save backwards for several iterations.
Of course, the catch on saving backwards is that if you were using features introduced *after* the version you are saving backwards too, those features of course will not work with the older engine. Also, you may have to save backwards in steps as well, i.e. -
The current IDE (9.6) I believe has problems saving backwards past vers. 7.x (unconfirmed, this is my suspicion).
With 7.x., I would not try to save backwards past 5.5.
with 5.5, it should** be possible to save back to 2.x.
I've never tried going pas that, so caveat emptor
To sum up, as far as I know, you should have no problem compiling any file with a .rev extension from the current Lc IDE.
- a few caveats to the above -
I work mostly in the ancient MetaCard IDE, not the current one.
I do use the current one on rare occasions to test my theories, or to answer questions about the new IDE specifically, or to test for bugs. YMMV.

Re: Having trouble building an app
My question is "Why can I not build an application with LC in the same manner I did for years using Revolution 4.0"?
That manner began with a mainstack, and added substack, a means of navigating from the main stack to the substack (usually via a button script) and whatever fields and other objects the substack may contain.
Upon building the application, I select "Move substacks into individual stackfiles"
I select create folder for stackfiles.
In Revolution, the stack builder would run, finish and upon opening the app file, navigating to the substack,and doing any editing on the substack, those edits would save until the next time I opened the file.
I have applications built that way that are still working fine, some after nearly 20 years. The last one built in 2006.
I cannot build an application using the same method with Livecard. I am told it cannot be done.
I had thought Livecard had incorporated all of Revolution, but it seems to not the case.
That is as clear as I can make it my question.
I had planned on installing 9.0 or earlier to try it, but I did not find a 64 bit version before 9.5.
LC 9.5 gave me the same results with either new stacks built in LC or older Rev stacks.
That manner began with a mainstack, and added substack, a means of navigating from the main stack to the substack (usually via a button script) and whatever fields and other objects the substack may contain.
Upon building the application, I select "Move substacks into individual stackfiles"
I select create folder for stackfiles.
In Revolution, the stack builder would run, finish and upon opening the app file, navigating to the substack,and doing any editing on the substack, those edits would save until the next time I opened the file.
I have applications built that way that are still working fine, some after nearly 20 years. The last one built in 2006.
I cannot build an application using the same method with Livecard. I am told it cannot be done.
I had thought Livecard had incorporated all of Revolution, but it seems to not the case.
That is as clear as I can make it my question.
I had planned on installing 9.0 or earlier to try it, but I did not find a 64 bit version before 9.5.
LC 9.5 gave me the same results with either new stacks built in LC or older Rev stacks.
Re: Having trouble building an app
I'm not quite sure why a 32 bit version would stop you from carrying out your play to test in an earlier version (?), but the question I initially came in on was which stacks to post here for someone to dissect. As far as I know, and as I stated previously, LiveCode 9.x should well be able to compile anything you made in a previous version or current version, with substacks, with substacks moved into their own folder.
I'll go back to the first page of this thread and read from there, as I currently have the afternoon off, and come back if I can think of anything someone else hasn't already thought of (but at 3 pages, i certainly doubt that).
BBIAB (possibly hours, if I actually test on win 10).

Re: Having trouble building an app
Ok, I didn't quite read the entire 3 pages, in fact, I only got to your post which said -
1.) this has nothing to do with your code.
2.) going through the project exactly as you stated, with the 2nd stack as a substack and using the standalone settings to separate the two, it failed to bring up records from the Data folder. As a side note, using the standalone settings to separate the two resulted in the records stack being given the extension ".rev", which I found pretty odd.
3.) I tested back to 8.1.9 and found the behavior to be the same, so this is an ongoing bug in the standalone settings.
4.) At this point, I changed the substack to be it's own mainstack and saved it in the project folder by creating a sub-folder named 'Data' and saving it there. As you can see, 3 attempts were made with the previous configuration.

5.) I changed the standalone settings to use "Add Stack File", and browse manually to the records file. You see the result here -

The standalone worked with this configuration and displayed no issues, SO, my best guess if you want to keep doing it the way you were doing (which *should* work, but apparently does not now), you have 1 of 3 options.
Either make the substack a mainstack and do as I did, adding it back through standalone settings, OR you can code the button manually to show the path to the records stack if you really need it in a separate folder, OR, you can skip sticking the records stack into the data folder, instead leaving it as a subStack of your programs mainstack.
Hopefully the above is of some help to you.
*Edit 1 - I finally caught up to the reason you want to keep the records separate from the rest of the program, saving the stack as a main stack into Data now makes sense. It will retain whatever you put into it if saved that way (as a stack, not as part of the executable).
*Edit 2 - I have now finished completely reading this thread from beginning to end. I am shocked I did not know this, Richard, you wrote a book ?
-- so I recreated the project as you laid it out, in a Win10 Vm, with 9.5. Here is what I think is going on (in no particular order) :My mainstack is "Blood Sugar" and the substack is "Blood Sugar Record"...In the card script of the main stack is the following:
{the code you posted...}
The only other script in the stack is the one button that takes me to the stack where my readings are recorded. It is simply:
{the code you posted...}
In the development environment all works as it is supposed to.
When I build the application,clicking the "Go to Record" button does nothing.
The substack is in the data folder as it should be, the application is where it is supposed to be.I can open the substack in the development mode and it works, but when I open the application and try to get to the substack, it does nothing.
I have looked for typos and extra spaces but can find nothing.
1.) this has nothing to do with your code.
2.) going through the project exactly as you stated, with the 2nd stack as a substack and using the standalone settings to separate the two, it failed to bring up records from the Data folder. As a side note, using the standalone settings to separate the two resulted in the records stack being given the extension ".rev", which I found pretty odd.
3.) I tested back to 8.1.9 and found the behavior to be the same, so this is an ongoing bug in the standalone settings.
4.) At this point, I changed the substack to be it's own mainstack and saved it in the project folder by creating a sub-folder named 'Data' and saving it there. As you can see, 3 attempts were made with the previous configuration.

5.) I changed the standalone settings to use "Add Stack File", and browse manually to the records file. You see the result here -

The standalone worked with this configuration and displayed no issues, SO, my best guess if you want to keep doing it the way you were doing (which *should* work, but apparently does not now), you have 1 of 3 options.
Either make the substack a mainstack and do as I did, adding it back through standalone settings, OR you can code the button manually to show the path to the records stack if you really need it in a separate folder, OR, you can skip sticking the records stack into the data folder, instead leaving it as a subStack of your programs mainstack.
Hopefully the above is of some help to you.
*Edit 1 - I finally caught up to the reason you want to keep the records separate from the rest of the program, saving the stack as a main stack into Data now makes sense. It will retain whatever you put into it if saved that way (as a stack, not as part of the executable).
*Edit 2 - I have now finished completely reading this thread from beginning to end. I am shocked I did not know this, Richard, you wrote a book ?

Re: Having trouble building an app
In the pursuit of finding out where this bug was introduced, I got the standalone setting of moving the substack to a separate file in the previously mentioned "Data" folder through the standalone settings to work in Lc 8.01.
It did *not* work in 8.1.2, so it looks like that is where the bug starts.
Has anyone else submitted a bug report for this yet?
*Edit - I was not able to find one in the qdb as of yet. If anyone else knows of one, please post it, otherwise I'll post a bug rep. myself tomorrow. HAVE A GREAT NEW YEAR ALL
It did *not* work in 8.1.2, so it looks like that is where the bug starts.
Has anyone else submitted a bug report for this yet?
*Edit - I was not able to find one in the qdb as of yet. If anyone else knows of one, please post it, otherwise I'll post a bug rep. myself tomorrow. HAVE A GREAT NEW YEAR ALL


Re: Having trouble building an app
Thank you. I had gotten away from scripting anything for a few years when I began this little project, but I feel certain I was using LC successfully in this manner before and was surprised upon seeing all the successful builds with the .rev extension on them.
when I looked for them.
As soon as I can sort out how to accomplish the method you have told me, I will give it a try.
As far as my mention of Gaskin's book I feel certain now that I gave the credit to to wrong person. Sorry. I believe the book I had in mind was written by a fellow named Dan (something) Both were and are I hope still helping dummies like me. The book I had in mind was the hypertalk reference manual.
Thank you again. I was beginning to believe I had either lost my mind or had indeed stepped into some kind of other continuum as no one seemed to remember this method of building a standalone.
BTW, I had tried the 9.0 installer but it had generic file icon and asked me what to open it with when I attempted to open it. I assumed it was because it was 32 bit.
when I looked for them.
As soon as I can sort out how to accomplish the method you have told me, I will give it a try.
As far as my mention of Gaskin's book I feel certain now that I gave the credit to to wrong person. Sorry. I believe the book I had in mind was written by a fellow named Dan (something) Both were and are I hope still helping dummies like me. The book I had in mind was the hypertalk reference manual.
Thank you again. I was beginning to believe I had either lost my mind or had indeed stepped into some kind of other continuum as no one seemed to remember this method of building a standalone.
BTW, I had tried the 9.0 installer but it had generic file icon and asked me what to open it with when I attempted to open it. I assumed it was because it was 32 bit.
Re: Having trouble building an app
I'll set up a video for you, you'll see it isn't very hard at all.
Heh, well, it explains why I didn't find itoldummy wrote: ↑Sat Jan 02, 2021 7:41 amAs far as my mention of Gaskin's book I feel certain now that I gave the credit to to wrong person. Sorry. I believe the book I had in mind was written by a fellow named Dan (something) Both were and are I hope still helping dummies like me. The book I had in mind was the hypertalk reference manual.


Re: Having trouble building an app
I just built a standalone and it works just fine. I didn't use the data folder ( not sure why I ever did).
Thanks to all for your help. This was getting me far too frazzled. A project this simple I could have simply used a logfile created in notepad, but using stacks make things expandable.
I cannot say thanks to often,Bogs.
Thanks to all for your help. This was getting me far too frazzled. A project this simple I could have simply used a logfile created in notepad, but using stacks make things expandable.
I cannot say thanks to often,Bogs.
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Having trouble building an app
Dan Shafer: "Revolution: Software at the Speed of Thought"
Not much sign of either Dan Shafer or his book for a very long time.
This: http://shafermediastore.com/tech_main.html is no longer available.
Last seen in 2010: https://web.archive.org/web/2010*/http: ... _main.html
And, Yes, before you ask, I have trawled the net for pirated PDF versions, and found nothing.
Not much sign of either Dan Shafer or his book for a very long time.
This: http://shafermediastore.com/tech_main.html is no longer available.
Last seen in 2010: https://web.archive.org/web/2010*/http: ... _main.html
And, Yes, before you ask, I have trawled the net for pirated PDF versions, and found nothing.
Re: Having trouble building an app
Seems that I have another issue with this, hopefully an easier explanation.
I added a field"record" and a button to enter my data.
The button script is as follows:
on mouseUp
ask "What is the reading?"
put it & "---" &the date&"---"& the time & cr after fld "record"
end mouseUp
The ask dialogue never shows but as soon as I click the button this shows up in the field exactly as shown here.
ask plainWhat is the reading?false---1/2/21---7:18 AM
It seems to me this script should work.
I added a field"record" and a button to enter my data.
The button script is as follows:
on mouseUp
ask "What is the reading?"
put it & "---" &the date&"---"& the time & cr after fld "record"
end mouseUp
The ask dialogue never shows but as soon as I click the button this shows up in the field exactly as shown here.
ask plainWhat is the reading?false---1/2/21---7:18 AM
It seems to me this script should work.
Re: Having trouble building an app
In almost all cases, it is better to separate the information your program uses from the main program itself, the main question you really need to answer is where the various parts should be located.
In the olden days of yore, I would have setup my folder structure much as you have in the beginning of this thread, with all sub folders being in the main folder. These days however, it is often a wiser course to have your main program data in the user's documents folder, especially if you are deploying to multiple systems.
In the case where you are developing this solely for yourself and know you won't use it on anything else, you might still organize your folder structure just to differentiate the various files that make up the program, however I'll leave that call to your own judgement

I went ahead and made the work around video, just in case anything I said in the previous post wasn't clear. You can view that here.
The script is working exactly as you wrote it here, I simply copied and pasted it into the script for the button as you see here --oldummy wrote: ↑Sat Jan 02, 2021 1:38 pmI added a field"record" and a button to enter my data.
The button script is as follows:The ask dialogue never shows but as soon as I click the button this shows up in the field exactly as shown here.Code: Select all
on mouseUp ask "What is the reading?" put it & "---" &the date&"---"& the time & cr after fld "record" end mouseUp
ask plainWhat is the reading?false---1/2/21---7:18 AM
It seems to me this script should work.
Not sure why you wouldn't see the same result


-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Having trouble building an app
Well, your script worked after I popped a few spaces into it:
But the result looked pretty ugly:
- -
Mainly because you used single ampersands instead of double ones:
-
-
Code: Select all
on mouseUp
ask "What is the reading?"
put it & "---" & the date & the time & cr after field "record"
end mouseUp
- -
Mainly because you used single ampersands instead of double ones:
Code: Select all
on mouseUp
ask "What is the reading?"
put it && "---" && the date && the time & cr after field "record"
end mouseUp
- Attachments
-
- SUGAR.livecode.zip
- Here's the stack.
- (1.01 KiB) Downloaded 244 times
-
- Livecode Opensource Backer
- Posts: 10099
- Joined: Fri Feb 19, 2010 10:17 am
Re: Having trouble building an app
Dan Shafer died in 2017.
https://www.danshaferlegacy.com/books
https://www.facebook.com/onemindfellowship
If you can work out how programming LIveCode and being some sort of guru go together you're a better
person than I am.
https://www.danshaferlegacy.com/books
https://www.facebook.com/onemindfellowship
If you can work out how programming LIveCode and being some sort of guru go together you're a better
person than I am.
Re: Having trouble building an app
Thanks. This is the trouble I expected to have with years away from coding. Remembering little things.
Sorry to hear about Dan Shafer.
And thank you.
Sorry to hear about Dan Shafer.
And thank you.