Hi there,
since weeks i´m working on really nasty problem. The attached .zip contains the isolated problem:
in the .livecode-file you can see what i wanna do: Btn "Laden" loads an array from a binfile. The buttons "0" and "1" sorts the datagrid by the column "Flag_Abstossung". It works well in Livecode BUT NOT in a standalone.
I cant find any reasons why its not working like under development-envoirment.
Anyone got a idea whats wrong in this little scripts?
bet wishes
Thomas
edit: In a former state of work (btns "0" & "1" werent working) the array was succesfully loaded into the grid. Then I added the scripts for the 2 buttons and nothing works anymore.
Load Array and put it into a Datagrid - Bugs?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Load Array and put it into a Datagrid - Bugs?
- Attachments
-
- load datagrid.zip
- (4.25 KiB) Downloaded 535 times
Re: Load Array and put it into a Datagrid - Bugs?
The most likely answer is that the datagrid template got deleted. (it as an automatically created substack added to the project when a datagrid is added)
Try this..
Open your stack in the IDE.
Add a new datagrid
Delete the new datagrid
When it asks if you want to delete the template associated with the datagrid answer no.
Save your stack.
Build the standalone and see if it works.
You must also make sure that your data file is in the right spot. If you go to your standalone settings, the copy files pane, you can add the file that contains your encoded array. This way, when you build the standalone that file will be copied and placed next to the .exe. (or on a mac it would place it in the .app package) The defaultfolder when the application starts should be the directory it executes from so if the data file should be readable using your current code.
After adding and removing a datagrid, but leaving the template, your stack is working for me as a standalone.
Try this..
Open your stack in the IDE.
Add a new datagrid
Delete the new datagrid
When it asks if you want to delete the template associated with the datagrid answer no.
Save your stack.
Build the standalone and see if it works.
You must also make sure that your data file is in the right spot. If you go to your standalone settings, the copy files pane, you can add the file that contains your encoded array. This way, when you build the standalone that file will be copied and placed next to the .exe. (or on a mac it would place it in the .app package) The defaultfolder when the application starts should be the directory it executes from so if the data file should be readable using your current code.
After adding and removing a datagrid, but leaving the template, your stack is working for me as a standalone.
Re: Load Array and put it into a Datagrid - Bugs?
Hi Tom,
I think this is just a path problem!
You have this in the btn "Laden":
...
## No path, just the filename!
put URL "binfile:test_highscores" into zwischen
...
And in the standalone the DEFAULTFOLDER is obviously set to somewehre else!
This also did not work in my IDE because of this, I had to set the defaultfolder first!
Crate an ABSOLUTE pathname with the stack/standalone filename and it should work.
Best
Klaus
I think this is just a path problem!
You have this in the btn "Laden":
...
## No path, just the filename!
put URL "binfile:test_highscores" into zwischen
...
And in the standalone the DEFAULTFOLDER is obviously set to somewehre else!
This also did not work in my IDE because of this, I had to set the defaultfolder first!

Crate an ABSOLUTE pathname with the stack/standalone filename and it should work.
Best
Klaus
Re: Load Array and put it into a Datagrid - Bugs?
Hi sturgis,
thx alot this works. Never mentioned that the substack was deleted or so. This is really nasty.
@Klaus:
No, it wasnt the path cause I copied the .exe-file in the same directory like the binfile.
thx alot this works. Never mentioned that the substack was deleted or so. This is really nasty.
@Klaus:
No, it wasnt the path cause I copied the .exe-file in the same directory like the binfile.
Re: Load Array and put it into a Datagrid - Bugs?
It is possible the substack was accidentally deleted in the app browser. (or the message box) If you right click a substack in the app browser and click delete it goes away with no warning this is true. While its not EASY to accidentally delete a substack it is certainly possible, but now that you know what to look for you'll be able to watch for the problem. (open the application browser, click the disclosure triangle next to your stack name, and see if there is a numbered datagrid template stack listed there also)
If its not there, that is a problem.
If its not there, that is a problem.
Tomka wrote:Hi sturgis,
thx alot this works. Never mentioned that the substack was deleted or so. This is really nasty.
Re: Load Array and put it into a Datagrid - Bugs?
OK, it looked likeTomka wrote:@Klaus:
No, it wasnt the path cause I copied the .exe-file in the same directory like the binfile.
