Inheritance dilemma
Inheritance dilemma
- Subject: Inheritance dilemma
- From: David Graham <email@hidden>
- Date: Mon, 21 Apr 2003 09:35:45 -0700
While John D. was assisting me with a script object as a storage for
preferences, I got off on a bit of a tangent. Basically (if I
understand it correctly), JD recommended storing, retrieving, and
writing to the prefs as a record in the library file. I still think it
should be as easy as retrieving the individual properties directly from
the parent script object, but can't figure out why it doesn't work like
I'd expect.
For instance:
(Given a script library 'libTest' with the following property)
property foo : "bar"
When I execute the following, it functions as I would expect:
-- EXAMPLE 1
property parent : load script alias "Dave's
HD:Users:dgraham:Desktop:libTest"
get foo
--> "bar"
So if the parent script's properties are treated as it's own, why don't
the handlers inherit them as well?
-- EXAMPLE 2
property parent : load script alias "Dave's
HD:Users:dgraham:Desktop:libTest"
TestInheritance()
to TestInheritance()
get foo
end TestInheritance
--> Error "The variable foo is not defined."
TIA!
- Dave
--
david m graham
619.322.9698
http://homepage.mac.com/davidgraham/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.