Re: scope problem
Re: scope problem
- Subject: Re: scope problem
- From: Axel Luttgens <email@hidden>
- Date: Fri, 29 Aug 2008 12:01:43 +0200
Le 29 août 08 à 02:28, tom wible a écrit :
this code:
to getParentOf(path)
set AppleScript's text item delimiters to "/"
try
set pPath to text items 2 thru -2 of path
set pPath to pPath as string
end try
set AppleScript's text item delimiters to ""
return pPath
end getParentOf
script etvClass
property parent : recClass
to parseInfo(interactive)
set eyeBundle to getParentOf(my fileName)
give this error:
(*«script» doesn't understand the getParentOf message.*)
obviously i'm ignorant of the finer points of applescript scoping...
Hello Tom,
As Ed already noticed, you don't help us very much. ;-)
Anyway, the following piece of code could provide you with some clues
about the error message:
on getParentOf(path)
return "+ " & path & " +"
end getParentOf
script recClass
property parent : application "Finder"
end script
script etvClass
property parent : recClass
property fileName : "initial value"
on parseInfo(interactive)
set eyeBundle to getParentOf(my fileName)
end parseInfo
end script
etvClass's parseInfo(true)
Running the above yields an error similar to the one you are
encountering (it is interesting to have a look at the events log).
Now, comment out the
property parent : application "Finder"
line, and everything should be working as expected.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden