> If the logic in ShotObject.nextframe does decide to do
> GameObject.nextframe, how does it make that happen? I mean how do I tell
> it to pass the .nextframe call on up the chain to its super's .nextFrame?
Like this:
Sub NextFrame // (method of ShotObject)
[Do some stuff...]
Super.nextFrame
End Sub
"Super" is a keyword meaning "my superclass". Alternately, you could say:
Sub NextFrame // (method of ShotObject)
[Do some stuff...]
GameObject.nextFrame
End Sub
but Super is better, because you might someday change the name of
GameObject, or insert another class between GameObject and ShotObject, and
with Super, the code doesn't have to change.
I've put the nextFrame call at the bottom in these examples, but it could be
at the top as well, it's totally a matter of what makes sense given your
situation.
lj
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|