• Please review our updated Terms and Rules here

System 7, SimpleText and external text files

Fallingwater

Member
Joined
Oct 10, 2009
Messages
47
I'm trying to get a Powerbook 145b to work as a text editor. The computer has a failed hard drive, so using BasiliskII I've created a boot floppy that contains a bare minimum System 7.1 plus SimpleText. This runs and does let me create and save files to the floppy, which I can then mount on my Linux box and read from; the files have no extension, but just adding a .txt at the end causes them to be opened and read perfectly.

The problem is doing the reverse - that is, putting a txt file created by another computer on the boot floppy and opening it in SimpleText. On running this on the Powerbook I can see the txt files there on the desktop, but if I doubleclick them (regardless of whether they have an extension or not) the system complains that it can't open them because it can't find the program that created them. If I run SimpleText, do File->Open and point it at the desktop, I don't see the files in the dialog. There's no option in the dialog to force it to list *.*, either.

What gives?
 
The problem is the file you are copying isn't having its file type set correctly. This is normally stored in the resource fork, something that is HFS specific, files copied from Linux/DOS/etc. will lack this. Apple's PC Exchange had a facility to map DOS file extensions to a specific file type/creator, your Linux tools to read/write HFS floppies likely do too.

see: http://linux.die.net/man/1/hattrib
and: http://revolution.byu.edu/helps/file-creatorcodes.php

Your text files should have a file type of "TEXT" and creator of "ttxt". Yes, it is case sensitive.
 
Last edited:
Oh, excellent. Fiddly, but I can probably script it to something that'll copy and hattrib the file all in one command. Thanks!
Edit: apparently not that easy, there's a whole group of commands that need to be used to manipulate files in hfs. Oh well, manpages here I come.
Edit: nope, not working. I figured out hmount and all that, and did the hattrib which returned no errors, and the powerbook still says it can't find the program.

http://i.imgur.com/NxedCQY.png

Don't know what else to do at this point.

Edit: another question, if I may - after I removed everything that could be removed from the bootable floppy and added SimpleText I have about 60 kb free, enough for some writing but not enough to do things like e-reading. Thing is, I can't seem to access the system files in the floppy in order to see if I can shave off some space. If I select the floppy itself, Linux reports its contents as some 70 kb, but the space occupied as 1.3 megabytes. Where is all this stuff if I can't see it in the directory tree?
 
Last edited:
Double check to see what the filetype/creator is on files saved by SimpleText. Its odd that the program isn't picking up the files with the filetype/creator set.
 
I have solved the problem by using TeachText. I transfer files to the floppy using the Linux utilities and apply the proper file types, but the system still refuses to open them on bootup, and they aren't openable in TeachText's open menu either - they are greyed out. However, if I type a few random characters in an empty TeachText screen and save the result in the same directory with the greyed-out files the whole thing syncs up, somehow, and I'm then able to open the other text files. I don't know what filesystem dark magic is going on here, but I don't really care as long as I can open my text files and save them.

Thanks for the help!
 
Back
Top