🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1745

Re: Text Editor Example

#1745
From: Joi Ellis [TeamB]
Date: Mon, 24 Sep 2001 13:48
25 lines
2095 bytes
Rob <"relaxedrob@optushome.com.au"> wrote:
> Howdy all!

> I have been building a basic text editor from the JBuilder Personal Tutorials. I
> have done it - it works ok, but I notice that the line endings used only contain
> line-feeds, not carriage-returns. How do I make it so that when it writes the
> text to the file it uses "\r\n".

JBuilder's editor recognizes and uses the newline style stored in existing
Java files.  When creating new files, (ie with wizards or File | Add ) then
it will use the default newline for the platform (JB4) or the configured
setting in Tools | Editor Settings (JB5.)  JB5's default is the platform's
newline, but you can override it.

I suspect some of the tutorials were written on Solaris or Linux workstations.

Java the language doesn't care which newline style the source file contains,
as it recognizes and handles all of them.

-- 
Joi Ellis (TeamB)               http://www.teamb.com/
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Guidelines: http://www.borland.com/newsgroups/guide.html
Only posts which violate the rules in guide.html are subject to cancelation.
Technical Details
Message-ID: <3baf39b1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!sjcppf01.usenetserver.com!usenetserver.com!nntpserver.com!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!194.25.243.42.MISMATCH!news.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews!not-for-mail
References: <3baec8db_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,6aeabba756570a89
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-09-24 07:06:04 PST
Message-ID: <3baf39b1_1@dnews>
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Subject: Re: Text Editor Example
Newsgroups: borland.public.jbuilder.java.api
References: <3baec8db_1@dnews>
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))
NNTP-Posting-Host: 209.46.41.66
Date: 24 Sep 2001 06:48:34 -0700
X-Trace: dnews 1001339314 209.46.41.66 (24 Sep 2001 06:48:34 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!sjcppf01.usenetserver.com!usenetserver.com!nntpserver.com!hub1.nntpserver.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!t-online.de!194.25.243.42.MISMATCH!news.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews!not-for-mail