Can't read text from file on OS 9

Richard Gaskin ambassador at
Wed Sep 22 18:00:43 EDT 2004

Cubist at wrote:

> sez ambassador at
>>Trevor DeVore wrote:
>>>I have a weird problem here.  I built a standalone for OS 9 using 2.5.
>>>I'm testing under Classic but a client is testing on a machine running
>>>OS 9.
>>>In the code I use put URL ("file:"&pPath) into tMyVar to get text from
>>>a file.  The path is one retrieved from the answer file command.  On OS
>>>X and Windows the text is retrieved without a problem.  Not so on OS 9.
>>>I just get empty.  I also tried open file, read from file and close file
>>>but that doesn't work either.  No errors are reported, just not data
>>>from the file.
>>>Can anyone else confirm whether this is happening on their end?
>>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).

What's needed is a function to determine whether we're running under 9 
natively or in Classic.

What's the URL to the Bugzilla request for this?  I couldn't find it there.

  Richard Gaskin
  Fourth World Media Corporation
  Ambassador at

More information about the use-livecode mailing list