Page 1 of 1

DATAGRID does NOT load any files on standalone windows application

Posted: Sun Aug 18, 2019 4:59 pm
by just_another_user
Hi guys,

I face the following, I created a DataGrid in order to load some csv files, it works great when I am in the project, but when I export the standalone app for windows it does not. Not only it doesn't load any files , but it doesn't accept any mouseUp.
I don't know if it is relevant but I used DataGridHelper plugin when I created it.
The code I use to load is tha follwing

Code: Select all

 
 on mouseUp
   answer file "Select a file"
   put it into Rden
   replace "/" with space in Rden
   put IT into field "csv"
   SEND textChanged to field "csv"
   put URL ("file:" & it ) into tFileContents
   
   //put textDecode ( tFileContents , "UTF-8" ) into tFileContents2 
   Put tFileContents into field "textGRID" on Card "BEACH_wrestling" 
   
   put line 1 of tFileContents into tColumnTitles    ## Creates Columns from the contents of the CSV's first line
   
   //replace ";" with tab in tFileContents
   replace ";" with return in tColumnTitles
   if word 1 of tColumnTitles is "ID" THEN PUT "No"  before tColumnTitles 
   //set the dgProp["columns"]  of group "AppData" to "Col 1" & return & "Col 2"  & return & "Col 3"  & return & "Col 4"  & return & "Col 5"
   set the dgProp["columns"] of group "AppData" on Card "BEACH_wrestling" to tColumnTitles
   
   delete line 1 of tFileContents
   replace ";" with tab in tFileContents
   Put tFileContents into field "textGRID" on Card "BEACH_wrestling" 
   set the dgText of group "AppData" on Card "BEACH_wrestling" to tFileContents
end mouseUp



thanks in advance
Nick

Re: DATAGRID does NOT load any files on standalone windows application

Posted: Sun Aug 18, 2019 5:06 pm
by just_another_user
I think I figure it out, I went to standalone application settings on general tab, I chose "Select Incursions for the standalone application " , and then I went to the incursions tab and chose DATAGRID.

Re: DATAGRID does NOT load any files on standalone windows application

Posted: Sun Aug 18, 2019 5:23 pm
by Klaus
Hi just_another_user,

welcome to the forum!

Yes, good catch, unfortunately "Automatic search for inclusions" does not work reliably.
Using "DatagridHelper" or not has nothing to do with that "flaw".


Best

Klaus

Re: DATAGRID does NOT load any files on standalone windows application

Posted: Sun Aug 18, 2019 6:09 pm
by dunbarx
Hi.

What Klaus said. Unless you use only ask and answer commands, always, always select the inclusions yourself. You may miss some, but make that the first thing you suspect.

Craig