Standalone not saving data in substacks

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Standalone not saving data in substacks

Post by kaveh1000 » Wed Aug 14, 2019 9:45 am

Hi all

A strange problem recently that I can't link to anything specific. When I save a stack (with several substacks) as standalone, it has been working fine for a long time. Last few days I find that the Stack with data and the substacks are all saved, but the data in fields in substacks have disappeared in standalone.

I am trying different things but mostly working in the dark. Any hints please?

Regards
Kaveh
Kaveh

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Standalone not saving data in substacks

Post by jmburnod » Wed Aug 14, 2019 11:19 am

Hi Kaveh,
As far I know we cant save a substack of a standalone. We have to import data from external files. One file can be a stack where data are stored.
Best regards
Jean-Marc
https://alternatic.ch

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Standalone not saving data in substacks

Post by kaveh1000 » Wed Aug 14, 2019 11:28 am

Thanks Jean-Marc

But I have been using this for a long time. I save as standalone, then in the standalone I can open the substacks via a menu and I can see fields and the data in the original substacks in IDE are saved and are editable.

Perhaps there is something I am missing.

Regards
Kaveh
Kaveh

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone not saving data in substacks

Post by Klaus » Wed Aug 14, 2019 11:37 am

Hi Kaveh,

maybe this is not clear: So you have a stack with substacks and data in their fields.
Then you create a standalone from that stack with substacks and the data in the substacks are gone? Is that correct?

Well, I've never seen this in the last twenty years! :shock:
Sure there are no handlers that clear the data of the fields in the substack(s)?


Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Standalone not saving data in substacks

Post by jmburnod » Wed Aug 14, 2019 11:49 am

Hi,
I understand that substack of standalone can be modify by users.
Is that the case ?
Jean-Marc
https://alternatic.ch

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Standalone not saving data in substacks

Post by kaveh1000 » Wed Aug 14, 2019 12:08 pm

I might have been unclear. I am not suggesting that users of standalone change the data in substacks and then save the standalone with the new data. They can change data but when the quit it is lost unless rewritten elsewhere.

Klaus, on closer inspection, I can open all the substacks and click on pop-up menus for instance. But controls like data grids are completely unresponsive. so I can see a data grid with a scrollbar and I can see the text in it, but it is like a screenshot in that I cannot scroll up or down and clicking on the text does nothing. So the script relating to it is not working at all.

Any settings for producing the standalone that might help?
Kaveh

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone not saving data in substacks

Post by Klaus » Wed Aug 14, 2019 12:27 pm

Hm, very strange, sound like the DATAGRID library has not been copied to the standalone?

Does your MAINSTACK contain a datagrid?
LC only checks the mainstack when you check "Search forrequired inclusions..." in the
"Standalone Application" settings.

To work around this, create an empty datagrid on the first card of your mainstack and then simply
hide the datagrid, so LC recognizes that it needs to include the DG library.

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Standalone not saving data in substacks

Post by kaveh1000 » Wed Aug 14, 2019 12:59 pm

OK Klaus. Thanks for that. I just did some investigation of the stack in IDE. I open a substack "bugs" with a DataGrid called "bugs". I type in msg box:

Code: Select all

put the dgProp["row height"] of group "bugs" of stack "bugs"
I get the correct value of 20. I then say:

Code: Select all

set the dgProp["row height"] of group "bugs" of stack 'bugs" to 120 
I get:

Code: Select all

Message execution error:
Error description: Chunk: can't find stack
Hint:

and the row height does not change visibly.

When I then again say

Code: Select all

put the dgProp["row height"] of group "bugs" of stack "bugs"
I get the new value of 120.

In my previous version of a few days ago, I see the row height changing and I do not get an error. I am sure this is the root of the problem, so any hints greatly appreciated.
Kaveh

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone not saving data in substacks

Post by Klaus » Wed Aug 14, 2019 1:10 pm

In this line you use ONE single quote -> 'bugs", which LC does not like resp. does not recognize as a valid string for an object description!

Code: Select all

set the dgProp["row height"] of group "bugs" of stack 'bugs" to 120 

kaveh1000
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 508
Joined: Sun Dec 18, 2011 7:23 pm
Location: London
Contact:

Re: Standalone not saving data in substacks

Post by kaveh1000 » Wed Aug 14, 2019 1:52 pm

Sorry Klaus. That was a typo I made here, as I had not put in quotes in LiveCode (which worked anyway). So here is what I copied from the msg box:

Code: Select all

put the dgProp["row height"] of group "bugs" of stack "bugs"
result:

Code: Select all

20

Code: Select all

set the dgProp["row height"] of group "bugs" of stack "bugs" to 120
result

Code: Select all

Message execution error:
Error description: Chunk: can't find stack
Hint: 
then:

Code: Select all

put the dgProp["row height"] of group "bugs" of stack bugs
Result:

Code: Select all

120
Kaveh

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Standalone not saving data in substacks

Post by Klaus » Wed Aug 14, 2019 2:07 pm

Hm, sorry, no brilliant idea in the moment...

Post Reply

Return to “Talking LiveCode”