logo       

Textchange event & f.CreateTextFile: msg#02990

lang.realbasic.user

Subject: Textchange event & f.CreateTextFile

I have a edit field that is called SerialNo

I have this code in the TextChange event:
My problem is that
Dim f as folderItem
Dim stream as TextOutputStream
If me.text = "PTM-012" then
StaticText6.visible = False
SerialNo.visible = False
PurchaseLicense.visible = False
OKBtn.visible = True
OKBtn.enabled = True
Thanks.visible = True
f = Volume(0).Child("PortaText").Child("Contents").Child("Serial.txt")

If f.exists=false then
f.CreateTextFile As TextOutputStream
f.AppendToTextFile "PTM-012"
End If

End If

And this code in the KeyDown event:

f = Volume(0).Child("PortaText").Child("Contents").Child("Serial.txt")

If f.exists then
StaticText6.visible = False
SerialNo.visible = False
PurchaseLicense.visible = False
OKBtn.visible = True
OKBtn.enabled = True
Thanks.visible = True
Else
Thanks.visible = False

End If

My problem is in the TextChange event
In f.CreateTextFile as TextOutputStream

RB says you must use the value returned by this function

How do I fix that?

-Brian


- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise