script object scoping
script object scoping
- Subject: script object scoping
- From: tom wible <email@hidden>
- Date: Sat, 03 Jul 2010 16:03:42 -0400
i've successfully implemented hiroto's cascading constructors, then
applied that to another script.app:
{code}
property tvpi2crontabP : "/DVR/scripts/tvpi2crontab.app"
property tvpi2crontab : (load script POSIX file tvpi2crontabP)
on getLastPlayed(fileName)
...
end
on newRecClass(fileName)
script recClass
property parent : tvpi2crontab's newTvpiProgram(fileName)
property fileSize : 0.0
property lastPlayPos : missing value
property lastPlayDate : missing value
...
to setFileInfo(fileName, fileSize, fileDate)
copy fileName to my fileName
copy fileSize to my fileSize
set my startEvent to tvpi2crontab's newTvpiEvent()
copy fileDate to my startEvent's datetime
set {my lastPlayPos, my lastPlayDate} to getLastPlayed(fileName)
end setFileInfo
...
end
on newTvpiClass(fileName)
script tvpiClass
property parent : newRecClass(fileName)
to setFileInfo(fileName, fileSize, fileDate)
continue setFileInfo(fileName, fileSize, fileDate)
...
{code}
but i get the following error on run:
"«script tvpiClass» doesn't understand the getLastPlayed message."
now what? it was happy to set my startEvent to tvpi2crontab's
newTvpiEvent(), so the app's top-level is visible to instances of a
script object... _______________________________________________
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