• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Inheritance implementation question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Quark question
  • Next by Date: Where can I find a script that can clean up CF/LFs?
  • Previous by thread: Re: Inheritance implementation question
  • Next by thread: Controlling Audio CD with Applescript?
  • Index(es):
    • Date
    • Thread