DATAGRID does NOT load any files on standalone windows application

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
just_another_user
Posts: 2
Joined: Sun Aug 18, 2019 4:53 pm

DATAGRID does NOT load any files on standalone windows application

Post by just_another_user » Sun Aug 18, 2019 4:59 pm

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

just_another_user
Posts: 2
Joined: Sun Aug 18, 2019 4:53 pm

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

Post by just_another_user » Sun Aug 18, 2019 5:06 pm

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.

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

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

Post by Klaus » Sun Aug 18, 2019 5:23 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

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

Post by dunbarx » Sun Aug 18, 2019 6:09 pm

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

Post Reply