Re: Can't read text from file on OS 9

2004-09-29 Thread Robert Brenstein
  I am pretty sure that there is always some process running under OSX
 that is not running under OS9. The question is whether this function
 will return only OS9-specific processes under Classic or all, classic
 and osx, processes. Can't check at the moment, though.
Sorry, I'm coming in a little late here... is the purpose to determine from
an application whether it is running in Classic mode or in true OS 9? Or
am I missing the question?
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
Yes, we are indeed trying to find a reliable to know whether running 
under true OS9 or in Classic.

Robert
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-29 Thread Ken Ray
On 9/29/04 5:04 AM, Robert Brenstein [EMAIL PROTECTED] wrote:

 Yes, we are indeed trying to find a reliable to know whether running
 under true OS9 or in Classic.

Here's what I use - it's run from a PPC application and it determines
whether the PPC app is running under Classic mode on OS X or under true OS
9. It needs to be done in two parts - the first part determines if the app
itself is an OS X app or not, and if not, it then checks the status of the
classic mode:

function InClassicMode
  -- First, check to see if we're running on OS X
  if the fileName of this stack contains Contents/MacOS/ then
return false
  else
-- Second, check to see if the process Classic Support is in the
-- current process list. This will be true when running in OS X Classic
-- mode, but will be false if running in OS 9.
-- If true, then the app is a PPC app and Classic Mode is running,
-- so it must be running in Classic Mode.
-- If false, then the app is a PPC app and Classic Mode is *not*
-- running, which would mean that the app is running in OS 9 and
-- not in Classic Mode.

put format(tell app \Finder\\nget the processes\nend tell) into tAS
do tAS as AppleScript
put format(process \Classic Support\) into tClassicProcName
return (the result contains tClassicProcName)
  end if
end InClassicMode

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-28 Thread Robert Brenstein
On 9/24/04 6:47 AM, Robert Brenstein wrote:
 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 | [EMAIL PROTECTED]
 HyperActive Software   | http://www.hyperactivesw.com

 Just checked that OS9 returns the leading slash just as Classic does.
Oh well. It was a nice thought while it lasted. Does Andre's 
suggestion about checking the prefs folder work?

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com

Ken's post on another thread just gave me another idea to try to 
differentiate between native OS9 and Classic. Ken's script:

function isAppRunning pAppname
replace .app with  in pAppName
put tell application   q(Finder)  cr  return the processes  \
  cr  end tell into tAS
do tAS as AppleScript
put the result into tProcs
return (offset(process  q(pAppName),tProcs)  0)
end isAppRunning
I am pretty sure that there is always some process running under OSX 
that is not running under OS9. The question is whether this function 
will return only OS9-specific processes under Classic or all, classic 
and osx, processes. Can't check at the moment, though.

Robert
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-28 Thread J. Landman Gay
On 9/28/04 7:09 AM, Robert Brenstein wrote:
 On 9/24/04 6:47 AM, Robert Brenstein wrote:

  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 | [EMAIL PROTECTED]
  HyperActive Software   | http://www.hyperactivesw.com




  Just checked that OS9 returns the leading slash just as Classic does.


 Oh well. It was a nice thought while it lasted. Does Andre's
 suggestion about checking the prefs folder work?

 --
 Jacqueline Landman Gay | [EMAIL PROTECTED]
 HyperActive Software   | http://www.hyperactivesw.com



 Ken's post on another thread just gave me another idea to try to
 differentiate between native OS9 and Classic. Ken's script:

 function isAppRunning pAppname
 replace .app with  in pAppName
 put tell application   q(Finder)  cr  return the 
processes  \
   cr  end tell into tAS
 do tAS as AppleScript
 put the result into tProcs
 return (offset(process  q(pAppName),tProcs)  0)
 end isAppRunning

 I am pretty sure that there is always some process running under OSX
 that is not running under OS9. The question is whether this function
 will return only OS9-specific processes under Classic or all, classic
 and osx, processes. Can't check at the moment, though.

Good idea. I just tried it, and under OS X there is a process called 
Classic Support. I suspect this doesn't run in OS 9, so maybe checking 
for that would tell you if you are in OS X.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-28 Thread Ken Ray

 I am pretty sure that there is always some process running under OSX
 that is not running under OS9. The question is whether this function
 will return only OS9-specific processes under Classic or all, classic
 and osx, processes. Can't check at the moment, though.

Sorry, I'm coming in a little late here... is the purpose to determine from
an application whether it is running in Classic mode or in true OS 9? Or
am I missing the question?


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-28 Thread Jesse Sng
Hi,
Good idea. I just tried it, and under OS X there is a process called 
Classic Support. I suspect this doesn't run in OS 9, so maybe 
checking for that would tell you if you are in OS X.

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
Actually to think outside of the box, ALL you need to do is to detect 
ANY essential lower level process that can be found ONLY in OS X but 
will not be found in OS 9.

Examples are the Window Server or /System/Library/Core/pbs (pasteboard).
If you really need to check for classic then you will have to look 
for the string TruBlueEnvironment when the list of processes is 
returned to you.

Jesse
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-24 Thread Robert Brenstein
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 | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com

Just checked that OS9 returns the leading slash just as Classic does.
Robert
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-24 Thread Andre Garzia
Also,
I think preferences folder is different, one is ~/Library/Preferences 
the other is inside system folder (the true os 9) so checking for 
special folder path  should return different values, where the value of 
OS 9 is fixed and can be hardcoded, so you can check.

cheers
andre
On Sep 23, 2004, at 11:45 PM, J. Landman Gay wrote:
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. ;)
--
Andre Alves Garzia  2004  BRAZIL
http://studio.soapdog.org
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-24 Thread J. Landman Gay
On 9/24/04 6:47 AM, Robert Brenstein wrote:
 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 | [EMAIL PROTECTED]
 HyperActive Software   | http://www.hyperactivesw.com



 Just checked that OS9 returns the leading slash just as Classic does.
Oh well. It was a nice thought while it lasted. Does Andre's suggestion 
about checking the prefs folder work?

--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-23 Thread Cubist
sez [EMAIL PROTECTED]:
[EMAIL PROTECTED] wrote:
 sez [EMAIL PROTECTED]:
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?
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-23 Thread J. Landman Gay
On 9/23/04 2:47 PM, [EMAIL PROTECTED] wrote:
sez [EMAIL PROTECTED]:
[EMAIL PROTECTED] wrote:
sez [EMAIL PROTECTED]:
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 | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Can't read text from file on OS 9

2004-09-22 Thread Trevor DeVore
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?
--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Richard Gaskin
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.

A request for that has been discussed on the improve-rev list.  I 
couldnt' find a Bugzilla request for it -- anyone know if it's been 
submitted.

Your issue may also be related to:
http://support.runrev.com/bugdatabase/show_bug.cgi?id=2212
--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Andre Garzia
On Sep 22, 2004, at 4:23 PM, 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?
Trevor,
I had similar problem here, it was a bug that happened only running the 
stack under classic emulation, on REAL MacOS 9.x it worked fine... so 
it was labeled low priority in bugzilla. (or might even be solved by 
now). Try setting your startup disk to the MacOS 9.x system and reboot, 
run your app to see if bug persists. To not trust classic emulation, 
try real os 9.x

andre
--
Andre Alves Garzia  2004  BRAZIL
http://studio.soapdog.org
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Trevor DeVore
On Sep 22, 2004, at 12:34 PM, Richard Gaskin wrote:
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.

A request for that has been discussed on the improve-rev list.  I 
couldnt' find a Bugzilla request for it -- anyone know if it's been 
submitted.

Your issue may also be related to:
http://support.runrev.com/bugdatabase/show_bug.cgi?id=2212
Richard and Andre,
It's the 'running in Classic' problem you both mentioned.  I called to 
confirm with the client that he was testing on his OS 9 machine and he 
had actually tested under Classic.

Thanks for the help.

--
Trevor DeVore
Blue Mango Multimedia
[EMAIL PROTECTED]
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Andre Garzia
On Sep 22, 2004, at 6:43 PM, Mark Talluto wrote:
Problem is that all the new systems from Apple will not boot into 9 
directly.  Everyone better treat their old dino-bots well.  Wonder if 
my older machines will gain value as programmers need them now.

my iMac-that-belives-that-it-is-actually-luxoJr  boots fine in OS 
9.x... I am just scaried as hell when I think where my posix goodies 
went when I need them... The only way I could work while when OS9 was 
top was by using rebol as my shell for my command line addiction... 
but that was before me knowing revolution

Cheers
andre


--
Andre Alves Garzia  2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Richard Gaskin
[EMAIL PROTECTED] wrote:
sez [EMAIL PROTECTED]:
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
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can't read text from file on OS 9

2004-09-22 Thread Ken Ray
On 9/22/04 5:00 PM, Richard Gaskin [EMAIL PROTECTED] wrote:

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

Here's one, it does the job but only when called by a standalone (adjusted
for email display):


function stsInClassicMode
  -- First, check to see if we're running on OS X
  if the fileName of this stack contains Contents/MacOS/ then
return false
  end if
  
  -- Second, check to see if the process Classic Support is in the
  -- current process list. This will be true when running in OS X Classic
  -- mode, but will be false if running in OS 9.  If true, then the app is a
  -- PPC app and Classic Mode is running, so it must be running in Classic
  -- Mode. If false, then the app is a PPC app and Classic Mode is *not*
  -- running, which would mean that the app is running in OS 9 and not
  -- in Classic Mode.

  return stsIsClassicModeRunning()
end stsInClassicMode


function stsIsClassicModeRunning
  put format(tell app \Finder\\nget the processes\nend tell) into tAS
  do tAS as AppleScript
  put format(application process \Classic Support\) into
 tClassicProcName
  return (the result contains tClassicProcName)
end stsIsClassicModeRunning

I'm sure this could be modified to be called from a stack instead of a
standalone...

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution