Can't read text from file on OS 9

J. Landman Gay jacque at hyperactivesw.com
Thu Sep 23 22:45:08 EDT 2004


On 9/23/04 2:47 PM, Cubist at aol.com wrote:

> sez ambassador at fourthworld.com:
> 
>>Cubist at aol.com wrote:
>>
>>>sez ambassador at fourthworld.com:
>>>
>>>>If you're running in OS 9 natively I'm stumped.  But if you're running
>>>>Classic under OS X this is caused by paths being handled differently in
>>>>OS 9 and Classic.
>>>>You could account for this if it was possible to know if you're running
>>>>9 natively or in Classic, but alas it is not.
>>>
>>>   Correct me if I'm wrong, but isn't there a function that gives you the 
>>>pathname of the topStack? If there is, it seems to me that you should be 
> 
> able to 
> 
>>>get that pathname, and from it, determine exactly how the current OS takes 
>>>care of such things. Yes, this is an annoyance, but you should only need 
> 
> to do it 
> 
>>>once, during (pre)openStack... right?
>>
>>Yes, but the path returned by the Classic engine uses a form unique to
>>running Classic under OS X (it excludes the volume name normally needed
>>in OS 9, IIRC).
> 
>    Okay, it's a unique form of pathname. I get that. What I don't get is 
> this: What prevents you from parsing the silly thing to determine whether or not 
> it's a pathname for (a) honest-to-God MacOS 9, or (b) Classic under OS X? What 
> *other* information, that's *not* in the topStack's pathname, would you need 
> to make that determination? If the pathname of the topStack doesn't do it, I 
> seem to recall something about a "specialFolders" function to ID stuff like the 
> System Folder, the Preferences Folder, and so on -- maybe *that* would work?

I don't have an OS 9 machine to check right now, but maybe someone else 
can. If I remember right, OS 9 will return a path something like this:

   Hard Disk/AppFolder/Folder/file.rev

The Classic engine returns this path:

   /Hard Disk/Folder/Folder/file.rev

The OS X engine returns this path:

   /Folder/Folder/file.rev

If I'm right about the OS 9 path, then checking for a leading "/" would 
seem to do it. But someone with native OS 9 should check to make sure. 
My husband is playing solitaire on our machine and family harmony 
forbids interference. ;)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list