New topic: 

TextOutputStream.Writeline

<http://forums.realsoftware.com/viewtopic.php?t=47282>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        boborama          Post subject: 
TextOutputStream.WritelinePosted: Thu Mar 14, 2013 9:05 am                      
   
Joined: Fri Feb 15, 2008 2:19 am
Posts: 49                Know thy Audience: I'm writing a small little program 
that uses uses a TextOutputStream to write to a file.  The program will run on 
a Mac...but the files it produces are for Windows and Linux.

Suffice it to say that the default line "delimiter" of TextOutputStream seems 
to be a Carriage Return Chr(13).  
I would like BOTH a carriage return & linefeed -- in that order. 
Thus -- I decided I would change the TextOutputStream delimiter to a Linefeed  
...and since I believe the delimiter is only a single character....I will 
manually append a Carriage return to my line text before calling the write line 
 
I used the Real Studio reference and find the following snippet of code 
directly from the reference pitches an error 
so.... does anyone else have this problem? 

Dim t as TextOutputStream
t.Delimiter=Chr(10) //linefeed   
                             Top                boborama          Post subject: 
Re: TextOutputStream.WritelinePosted: Thu Mar 14, 2013 9:10 am                  
       
Joined: Fri Feb 15, 2008 2:19 am
Posts: 49                Oh...never mind.
You can't set the properties of a nil object.  Doh!
I don't think you can set the delimiter until you do something like...

t = TextOutputStream.Create(folderitem)   
                             Top                DaveS          Post subject: 
Re: TextOutputStream.WritelinePosted: Thu Mar 14, 2013 9:20 am                  
               
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4672
Location: San Diego, CA                t.write "this is your 
data"+endofline.windows

instead of writeline      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to