Hi,
According to Adreas Raab on 10 July 1997 in message 9707 to this list (Google is amazing)
1. Change FileStream class>>concreteStream to return CrLfFileStream.
Now to work and save your code in a file stream, recall that all text areas in Sqeauk can be used to excute code.
2. Using the file list create a new file, say doit.st. 3. Open the file using the file open menu. This will open a new purple window with the contents of your file. This looks similar to a workspace. 4. Edit text, inspect, display etc to your hearts content. 5. To save, use alt-s (cmd-s on Mac ?) 6. Squeak will prompt you to overwrite doit.st. Alas I have not investigated how to remove this prompt.
This file can now be opened with a conventional DOS editor like notepad and the contents have the expected CRLF newlines.
Note. If you use the 'view as hex' menu option in the file viewer, you will only see the 0d (CR). The CRLFFileStream strip the LF off when reading and inserts it when writing the file. Smart stuff.
Cheers Brent
----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.
On Wednesday 02 May 2001 10:21, Brent Pinkney wrote:
Hi,
According to Adreas Raab on 10 July 1997 in message 9707 to this list (Google is amazing)
- Change FileStream class>>concreteStream to return CrLfFileStream.
Now to work and save your code in a file stream, recall that all text areas in Sqeauk can be used to excute code.
- Using the file list create a new file, say doit.st.
- Open the file using the file open menu. This will open a new purple
window with the contents of your file. This looks similar to a workspace. 4. Edit text, inspect, display etc to your hearts content. 5. To save, use alt-s (cmd-s on Mac ?) 6. Squeak will prompt you to overwrite doit.st. Alas I have not investigated how to remove this prompt.
This file can now be opened with a conventional DOS editor like notepad and the contents have the expected CRLF newlines.
Note. If you use the 'view as hex' menu option in the file viewer, you will only see the 0d (CR). The CRLFFileStream strip the LF off when reading and inserts it when writing the file. Smart stuff.
There are some potential problems with changing the default file stream type. Some things in the system do not (or at least have not in the past) properly set the stream mode to binary, and so you can get extra, unwanted line ending characters in what were supposed to be binary files.
Some time ago I made a change set that fixed most of these problems, but I haven't kept it updated with the latest 3.1 stuff.
It's attached for your amusement. This was working in 3.1alpha, change set 3696, as of 25 Feburary. It will probably need to be changed for the current version.
squeak-dev@lists.squeakfoundation.org