Saving datas with RapaGUI
Saving datas with RapaGUI
Hi,
I'm looking the way to save datas like in the demo "dialogs" in Rapagui plugin.
Hope this is possible.
Thank you.
Pierre.
I'm looking the way to save datas like in the demo "dialogs" in Rapagui plugin.
Hope this is possible.
Thank you.
Pierre.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Saving datas with RapaGUI
Please describe in more detail what you want to do. The question is currently too general...
Re: Saving datas with RapaGUI
Hi,
I want to add the LOADING and SAVING function into the DIALOGS demo program wich came with RapaGUI plugin.
I add the OPEN, SAVE and SAVE_AS in the pulldown menu but can't figure what I shoud do to open or save the data I enter.
I tryed different version of: StringToFile(What should I wrote here?), projectname$)
Thank you.
I want to add the LOADING and SAVING function into the DIALOGS demo program wich came with RapaGUI plugin.
I add the OPEN, SAVE and SAVE_AS in the pulldown menu but can't figure what I shoud do to open or save the data I enter.
I tryed different version of: StringToFile(What should I wrote here?), projectname$)
Thank you.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Saving datas with RapaGUI
Depends on what you want to write to the file. If you want to write "Hello" to the file, you use:Pierre55 wrote:StringToFile(What should I wrote here?), projectname$)
Code: Select all
StringToFile("Hello", "test.txt")
Re: Saving datas with RapaGUI
Hi,
You need to RUN the DIALOGS demo in RapaGui to understand that I want to save all the datas you input.
Thanks
You need to RUN the DIALOGS demo in RapaGui to understand that I want to save all the datas you input.
Thanks
Re: Saving datas with RapaGUI
Hi,
Here it's the line that "editor" saved the text;
StringToFile(moai.Get("editor", "text"), projectname$)
Is there something like this I can use to save the datas in Dialogs ?
Thank you.
Here it's the line that "editor" saved the text;
StringToFile(moai.Get("editor", "text"), projectname$)
Is there something like this I can use to save the datas in Dialogs ?
Thank you.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Saving datas with RapaGUI
Sure, you need to use Listview.GetEntry to iterate over all items in the listview and then save them to a text file, e.g. something like this (not tested, from the top of my head):
Code: Select all
OpenFile(1, "output.txt", #MODE_WRITE)
For Local k = 0 To moai.Get("lv", "entries")-1
Local t$ = moai.DoMethod("lv", "getentry", k)
WriteLine(1, t$)
Next
CloseFile(1)
Re: Saving datas with RapaGUI
Thank you for the info but I have two problems, there is an error when I run the program "Unexpected symbol!" current line 187.
The second problem it's Hollywood that give the error at the wrong line because there is nothing at line 187.
It seems that the line reported is always +1.
So the error is on the line that said:
WriteLine(1, t$)
Bye!
The second problem it's Hollywood that give the error at the wrong line because there is nothing at line 187.
It seems that the line reported is always +1.
So the error is on the line that said:
WriteLine(1, t$)
Bye!
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Saving datas with RapaGUI
Well, it's hard to tell without seeing the complete script. So please post the script here and I'll check...
Re: Saving datas with RapaGUI
Hi,
First I would like to tell you that I really appreciate your help!
I finally found (with a lot of your help) the way to save the file in CSV format:
Function p_Save()
OpenFile(1, projectname$, #MODE_WRITE)
For Local k = 0 To moai.Get("lv", "entries") -1
Local state, item$, Nom$, Tjrs1$, Prix$, Exp$ = moai.DoMethod("lv", "getentry", k)
Local t$ = item$ .. "," .. Nom$ .. "," .. Prix$ .. "," .. Exp$
WriteLine(1, t$)
Next
CloseFile(1)
EndFunction
Now my next question: How can I do to LOAD the file in dialog window?
Thanks.
First I would like to tell you that I really appreciate your help!
I finally found (with a lot of your help) the way to save the file in CSV format:
Function p_Save()
OpenFile(1, projectname$, #MODE_WRITE)
For Local k = 0 To moai.Get("lv", "entries") -1
Local state, item$, Nom$, Tjrs1$, Prix$, Exp$ = moai.DoMethod("lv", "getentry", k)
Local t$ = item$ .. "," .. Nom$ .. "," .. Prix$ .. "," .. Exp$
WriteLine(1, t$)
Next
CloseFile(1)
EndFunction
Now my next question: How can I do to LOAD the file in dialog window?
Thanks.