Jose,
Here is the code to write to the text file.
Dim strout As TextOutputStream
Dim f As FolderItem
f = GetFolderItem("MyProgram_CFG.ini")
if f <> Nil then
strout = f.CreateTextFile
strout.WriteLine Name.text
strout.WriteLine Address1.text
strout.WriteLine Address2.text
strout.WriteLine Phone.text
strout.WriteLine eMail.text
strout.Close
MsgBox("The Configuration has been saved. Please press 'OK' to
continue...")
End if
Here is the code to read from the text file.
// Get Configuration info
Dim strin As TextInputStream
Dim f As FolderItem
f = GetFolderItem("MyProgram_CFG.ini")
If c <> Nil and f.exists then
strin = c.OpenAsTextFile
Name.text = strin.ReadLine
Address1.text = strin.ReadLine
Address2.text = strin.ReadLine
Phone.text = strin.ReadLine
Email.text = strin.ReadLine
strin.Close
End If
Jose, I use this asnd it works ok.
Jonathon
----- Original Message -----
From: "José Andrés" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Thursday, May 04, 2006 11:54 AM
Subject: Re: Write the app preference
Yes is the Application's 'Configuration' Preferences, but where do you put
this file in preference folder or in other place?.
you don't use the registry in windows?
At 01:49 p.m. 04/05/2006, you wrote:
Hello Jose,
Tell me are you referring to the Application's 'Configuration' Preferences?
The one that the end-user sets to there liking?
If so, I create a simple text ini file for it.
If not, then forgive me for not understanding.
Jonathon
----- Original Message ----- From: "José Andrés"
<[EMAIL PROTECTED]>
To: "RealBasic Lista" <[email protected]>
Sent: Thursday, May 04, 2006 9:17 AM
Subject: Write the app preference
Hello there.
I want to know a simple thing, Which is the best way to save the app
preferences for Windows? In the registry or in the preferences folder.
The users of my app told me many times that in windows the antispyware or
antivirus block the app, this is because my app write the preferences in a
xml file in the preference folder.
My answers always was put the app run like win98 with the right click, and
the program run great. I need to avoid that this happens because gives the
impression to the user that the program does not work.
Regards, Jose
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
Atte. Ing. José Andrés Morey
-------------------------------------------
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.auyantepui.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.3/331 - Release Date: 5/3/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>