[nsbasic-ce] Re: Writing to file keeps overwriting

2010-02-16 Thread bigp...@rogers.com
yup. the Seek worked. thanks

--- In nsbasic...@yahoogroups.com, epank...@... wrote:

 Sorry that I don't recall who it was that posted it, but did you try the 
 other suggestion that was given about doing a Seek to the end of the file and 
 then writing? As far as I know lots of people use that control, so it should 
 be pretty stable. 
 
 
 
 - Original Message - 
 From: bigp...@... 
 To: nsbasic...@yahoogroups.com 
 Sent: Friday, February 12, 2010 12:21:53 PM GMT -05:00 US/Canada Eastern 
 Subject: [nsbasic-ce] Re: Writing to file keeps overwriting 
 
 
 
 
 
 
 yes i am using 
 AddObject newObjects.utilctls.SFMain, FS3 
 
 Is there another way I could get this to work? 
 
 --- In nsbasic...@yahoogroups.com , Eric Pankoke epankoke@ wrote: 
  
  My guess is that you're not using the right command to append to the 
  file, so it's simply opening the file and wiping out the contents every 
  time you call OpenFile. Unfortunately, without knowing what type of 
  object FS3 is I can't give you any more specifics. 
  
  
  
  Eric Pankoke 
  
  Mobile Games Reviewer 
  
  My Site: http://www.rustysabre.com/ 
  
  Reviews: http://www.technobrains.com/, http://www.theappera.com 
  
  Blog: http://www.iphonelife.com/blogs/eric-pankoke 
  
  Twitter: http://www.twitter.com/RustySabre/ 
  
  
  
  -Original Message- 
  From: nsbasic...@yahoogroups.com [mailto: nsbasic...@yahoogroups.com ] On 
  Behalf Of bigpete@ 
  Sent: Wednesday, February 10, 2010 6:40 PM 
  To: nsbasic...@yahoogroups.com 
  Subject: [nsbasic-ce] Writing to file keeps overwriting 
  
  
  
  
  
  This code is in a command button. All the proper AddObjets are in the 
  From1_Load. 
  
  Every time I click the command button I want what ever is typed into 
  textbox1 and textbox3 to get written to a file 
  
  I enter a some info into the textboxes, tap the command button, then 
  retype some different information into the textboxs and tap the command 
  button...etc 
  
  What is happening is that only the last piece of data I type into the 
  text boxes show up in the file. 
  
  How do I get it to the information from the textboxes to save each time 
  I click the command button and not overwite. 
  
  Dim file 
  Dim abc 
  
  abc = textbox1.Text  ,  textbox3.Text  
  
  Set File = FS3.OpenFile(filename3) 
  
  File.WriteText abc,1 
  File.close 
 



-- 
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



[nsbasic-ce] Re: Writing to file keeps overwriting

2010-02-12 Thread bigp...@rogers.com
yes i am using   
AddObject newObjects.utilctls.SFMain, FS3

Is there another way I could get this to work?



--- In nsbasic...@yahoogroups.com, Eric Pankoke epank...@... wrote:

 My guess is that you're not using the right command to append to the
 file, so it's simply opening the file and wiping out the contents every
 time you call OpenFile.  Unfortunately, without knowing what type of
 object FS3 is I can't give you any more specifics.
 
  
 
 Eric Pankoke
 
 Mobile Games Reviewer
 
 My Site: http://www.rustysabre.com/
 
 Reviews: http://www.technobrains.com/, http://www.theappera.com
 
 Blog: http://www.iphonelife.com/blogs/eric-pankoke
 
 Twitter: http://www.twitter.com/RustySabre/
 
  
 
 -Original Message-
 From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On
 Behalf Of bigp...@...
 Sent: Wednesday, February 10, 2010 6:40 PM
 To: nsbasic...@yahoogroups.com
 Subject: [nsbasic-ce] Writing to file keeps overwriting
 
  
 
   
 
 This code is in a command button. All the proper AddObjets are in the
 From1_Load.
 
 Every time I click the command button I want what ever is typed into
 textbox1 and textbox3 to get written to a file
 
 I enter a some info into the textboxes, tap the command button, then
 retype some different information into the textboxs and tap the command
 button...etc
 
 What is happening is that only the last piece of data I type into the
 text boxes show up in the file.
 
 How do I get it to the information from the textboxes to save each time
 I click the command button and not overwite.
 
 Dim file
 Dim abc
 
 abc = textbox1.Text  ,  textbox3.Text 
 
 Set File = FS3.OpenFile(filename3)
 
 File.WriteText abc,1
 File.close



-- 
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: [nsbasic-ce] Re: Writing to file keeps overwriting

2010-02-12 Thread epankoke
Sorry that I don't recall who it was that posted it, but did you try the other 
suggestion that was given about doing a Seek to the end of the file and then 
writing? As far as I know lots of people use that control, so it should be 
pretty stable. 



- Original Message - 
From: bigp...@rogers.com 
To: nsbasic...@yahoogroups.com 
Sent: Friday, February 12, 2010 12:21:53 PM GMT -05:00 US/Canada Eastern 
Subject: [nsbasic-ce] Re: Writing to file keeps overwriting 






yes i am using 
AddObject newObjects.utilctls.SFMain, FS3 

Is there another way I could get this to work? 

--- In nsbasic...@yahoogroups.com , Eric Pankoke epank...@... wrote: 
 
 My guess is that you're not using the right command to append to the 
 file, so it's simply opening the file and wiping out the contents every 
 time you call OpenFile. Unfortunately, without knowing what type of 
 object FS3 is I can't give you any more specifics. 
 
 
 
 Eric Pankoke 
 
 Mobile Games Reviewer 
 
 My Site: http://www.rustysabre.com/ 
 
 Reviews: http://www.technobrains.com/, http://www.theappera.com 
 
 Blog: http://www.iphonelife.com/blogs/eric-pankoke 
 
 Twitter: http://www.twitter.com/RustySabre/ 
 
 
 
 -Original Message- 
 From: nsbasic...@yahoogroups.com [mailto: nsbasic...@yahoogroups.com ] On 
 Behalf Of bigp...@... 
 Sent: Wednesday, February 10, 2010 6:40 PM 
 To: nsbasic...@yahoogroups.com 
 Subject: [nsbasic-ce] Writing to file keeps overwriting 
 
 
 
 
 
 This code is in a command button. All the proper AddObjets are in the 
 From1_Load. 
 
 Every time I click the command button I want what ever is typed into 
 textbox1 and textbox3 to get written to a file 
 
 I enter a some info into the textboxes, tap the command button, then 
 retype some different information into the textboxs and tap the command 
 button...etc 
 
 What is happening is that only the last piece of data I type into the 
 text boxes show up in the file. 
 
 How do I get it to the information from the textboxes to save each time 
 I click the command button and not overwite. 
 
 Dim file 
 Dim abc 
 
 abc = textbox1.Text  ,  textbox3.Text  
 
 Set File = FS3.OpenFile(filename3) 
 
 File.WriteText abc,1 
 File.close 
 


-- 
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



[nsbasic-ce] Re: Writing to file keeps overwriting

2010-02-11 Thread chris_kenworthy
I'm going to hazard a guess that the form_load command for FS3 was:
AddObject newObjects.utilctls.SFMain, FS3

The syntax given matches what's specified in 
http://www.nsbasic.com/ce/info/technotes/TN08.htm

In that case, I would try:
File.Seek(0,2)

between OpenFile and WriteText. This moves 'current position in the file' to 0 
bytes offset from end of file.

Not guaranteed to work without tweaking, but let us know if that's any help.

--- In nsbasic...@yahoogroups.com, Eric Pankoke epank...@... wrote:

 My guess is that you're not using the right command to append to the
 file, so it's simply opening the file and wiping out the contents every
 time you call OpenFile.  Unfortunately, without knowing what type of
 object FS3 is I can't give you any more specifics.
 
  
 
 Eric Pankoke
 
 Mobile Games Reviewer
 
 My Site: http://www.rustysabre.com/
 
 Reviews: http://www.technobrains.com/, http://www.theappera.com
 
 Blog: http://www.iphonelife.com/blogs/eric-pankoke
 
 Twitter: http://www.twitter.com/RustySabre/
 
  
 
 -Original Message-
 From: nsbasic...@yahoogroups.com [mailto:nsbasic...@yahoogroups.com] On
 Behalf Of bigp...@...
 Sent: Wednesday, February 10, 2010 6:40 PM
 To: nsbasic...@yahoogroups.com
 Subject: [nsbasic-ce] Writing to file keeps overwriting
 
  
 
   
 
 This code is in a command button. All the proper AddObjets are in the
 From1_Load.
 
 Every time I click the command button I want what ever is typed into
 textbox1 and textbox3 to get written to a file
 
 I enter a some info into the textboxes, tap the command button, then
 retype some different information into the textboxs and tap the command
 button...etc
 
 What is happening is that only the last piece of data I type into the
 text boxes show up in the file.
 
 How do I get it to the information from the textboxes to save each time
 I click the command button and not overwite.
 
 Dim file
 Dim abc
 
 abc = textbox1.Text  ,  textbox3.Text 
 
 Set File = FS3.OpenFile(filename3)
 
 File.WriteText abc,1
 File.close



-- 
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.



Re: [nsbasic-ce] Re: Writing to file keeps overwriting

2010-02-11 Thread epankoke
Actually, the interesting thing is that based on the details of the OpenFile 
function, the code supplied shouldn't work at all. There is a second parameter 
to OpenFile that tells how the file should be opened, and according to the help 
the default for that parameter is 0, which is Read Only. 



- Original Message - 
From: chris_kenworthy chrisk...@gmail.com 
To: nsbasic...@yahoogroups.com 
Sent: Thursday, February 11, 2010 8:48:07 AM GMT -05:00 US/Canada Eastern 
Subject: [nsbasic-ce] Re: Writing to file keeps overwriting 






I'm going to hazard a guess that the form_load command for FS3 was: 
AddObject newObjects.utilctls.SFMain, FS3 

The syntax given matches what's specified in 
http://www.nsbasic.com/ce/info/technotes/TN08.htm 

In that case, I would try: 
File.Seek(0,2) 

between OpenFile and WriteText. This moves 'current position in the file' to 0 
bytes offset from end of file. 

Not guaranteed to work without tweaking, but let us know if that's any help. 

--- In nsbasic...@yahoogroups.com , Eric Pankoke epank...@... wrote: 
 
 My guess is that you're not using the right command to append to the 
 file, so it's simply opening the file and wiping out the contents every 
 time you call OpenFile. Unfortunately, without knowing what type of 
 object FS3 is I can't give you any more specifics. 
 
 
 
 Eric Pankoke 
 
 Mobile Games Reviewer 
 
 My Site: http://www.rustysabre.com/ 
 
 Reviews: http://www.technobrains.com/, http://www.theappera.com 
 
 Blog: http://www.iphonelife.com/blogs/eric-pankoke 
 
 Twitter: http://www.twitter.com/RustySabre/ 
 
 
 
 -Original Message- 
 From: nsbasic...@yahoogroups.com [mailto: nsbasic...@yahoogroups.com ] On 
 Behalf Of bigp...@... 
 Sent: Wednesday, February 10, 2010 6:40 PM 
 To: nsbasic...@yahoogroups.com 
 Subject: [nsbasic-ce] Writing to file keeps overwriting 
 
 
 
 
 
 This code is in a command button. All the proper AddObjets are in the 
 From1_Load. 
 
 Every time I click the command button I want what ever is typed into 
 textbox1 and textbox3 to get written to a file 
 
 I enter a some info into the textboxes, tap the command button, then 
 retype some different information into the textboxs and tap the command 
 button...etc 
 
 What is happening is that only the last piece of data I type into the 
 text boxes show up in the file. 
 
 How do I get it to the information from the textboxes to save each time 
 I click the command button and not overwite. 
 
 Dim file 
 Dim abc 
 
 abc = textbox1.Text  ,  textbox3.Text  
 
 Set File = FS3.OpenFile(filename3) 
 
 File.WriteText abc,1 
 File.close 
 


-- 
You received this message because you are subscribed to the Google Groups 
nsb-ce group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.