Object inheritance question...
Object inheritance question...
- Subject: Object inheritance question...
- From: Brendan Wilde <email@hidden>
- Date: Mon, 26 Sep 2005 17:01:54 +1000
I have a basic understanding of objects but i am having problems with a concept can someone point
me in the right direction, refer to below... I want to pick which object my new objects inherit from, at the moment i can only make objects inherit from a single parent, but need to have a variable amount of parents and then various children off each. For example 5 "street" objects each with various "house" objects.
So how do i make a "house" for my new street object that inherits all of streets variables and methods etc?
An example would be great. Thanks Brendan...
script street
property streetName : "Main"
display dialog "I am " & streetName & " Street and I want a house too!"
on x)
set streetName to x
end setName
on getName()
return streetName
end getName
end script
script house
property parent : street
display dialog "I am a house on " & getName() & " Street."
end script
run house
copy street to secondStreet
tell secondStreet
setName("Second")
run
end tell _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden