Re: Strange 9.1 errors

From: David (davidmccabe@MAC.COM)
Date: Fri May 25 2001 - 02:23:19 AEST


I've had "<<script>> doesn't understand the <<event something>> message"
type error often when using functions that call themselves recurcivly. Then
the problem will just stop for no know reason. It's odd.
______
David McCabe
davidmccabe@mac.com
http://homepage.mac.com/davidmccabe/
God is good!=20


> Greetings,
>=20
> I have  a script which I developed for a client On OS 9.0.
>=20
> It seems to have broke in 9.1. Does anyone have a clue what's going on?
>=20
> Error messages:
>=20
> <<Script>> doesn't understand the <<event sysotfl>> message
>=20
> I clicked 'edit' and the error appears in the subroutine "on
> parseNumberNameFromFileName" . I've pasted this routine below.
>=20
> also (=ABevent sysooffs=BB given =ABclass psof=BB:"-",
> =ABclass psin=BB:folderName)
>=20
>=20
> At first I thought the client "lost" an osax on upgrade, but the
> fact these errors start with sys seem to belie that theory.
>=20
> Routine below....all "vanilla" applescript
>=20
>=20
> TIA,
>=20
> Allan Greenier
> Fluency, LLC
>=20
> agreenier@snet.net
>=20
>=20
> on parseNumberNameFromFileName(fileName)
>=20
> set fileNameSuccessful to false
>=20
> writeToLog("parseNumberNameFromFileName( " & fileName & " )")
>=20
> set temp to ""
>=20
> set isFound to false
>=20
> try
>=20
> tell application "Finder"
>=20
> if not visible of (info for file fileName) then
>=20
>=20
> set counter to MAX_RECURSION + 1
> writeToLog("invisivible file " & fileName)
> return
> end if
>=20
> end tell
>=20
> on error
> set counter to MAX_RECURSION + 1
> writeToLog("invisivible file " & fileName)
> return
>=20
> end try
>=20
> if fileName contains ":" then
>=20
> set fileName to fileNameFromPath(fileName)
>=20
> end if
>=20
> writeToLog("parseNumberNameFromFileName( after if fileNameFromPath" &
> fileName & " )")
>=20
> set temp to fileName
>=20
> try
> set x to offset of "-" in fileName
>=20
> if x > 0 then
>=20
> set isFound to true
> set temp to nameBeforeDash(fileName)
>=20
> end if
> if not isFound then
> set x to offset of " " in fileName
> if x > 0 then
>=20
> set isFound to true
> set temp to nameBeforeSpace(fileName)
>=20
> end if
> end if
> if not isFound then
> set x to offset of "_" in fileName
> if x > 0 then
>=20
> set isFound to true
> set temp to nameBeforeUnderscore(fileName)
>=20
> end if
> end if
> if not isFound then
> set x to offset of "/" in fileName
> if x > 0 then
>=20
> set isFound to true
> set temp to nameBeforeSlash(fileName)
>=20
> end if
> end if
>=20
> on error
> writeToLog("Error on offset  in fileName")
> buildLog("Error on offset  in fileName", true)
> end try
>=20
> set temp to containsCMYK(temp)
>=20
> writeToLog("We massaged fileNameNumber" & temp)
> writeToLog("fileNameNumber about to be set to " & temp)
>=20
>=20
>=20
>=20
> if isItAnumber(temp) then
> set fileNameNumber to temp
> set fileNameString to fileNameNumber
> writeToLog("fileNameNumber set to " & fileNameNumber)
> set fileNameSuccessful to true
> else
> writeToLog("fileNameNumber not parsed")
> buildLog("fileNameNumber not parsed", true)
> end if
>=20
> end parseNumberNameFromFileName

------------------------------



This archive was generated by hypermail 2b29 : Sun May 27 2001 - 12:00:29 AEST