RE: Inheritance implementation question
RE: Inheritance implementation question
- Subject: RE: Inheritance implementation question
- From: Olof Hellman <email@hidden>
- Date: Tue, 9 Apr 2002 16:18:07 -0700
>
>make new superThing with properties {type:Thing type}
It is not hard to do this. Consider for example:
tell "your super app"
set myClass to get class of superThing 1
make new myClass
end tell
This will compile and run just fine if each object can return an appropriate
class property, i.e. thing, thang or thung depending on what it is.
However,
tell "your super app"
set myClass to thung
make new myClass
end tell
Is more difficult. In this case, "thung" can be interpreted as an object
specifier, so when the first line executes, your application will be sent a
get data event for its thung property, which is not what you want. However,
it is possible to define a separate set of terms {thang_class, thing_class,
thung_class} as an enumeration, and write
tell "your super app"
set myClass to thung_class
make new myClass
end tell
And yes, this really is a topic for the implementors list.
- Olof
_______________________________________________
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.