[Tutor] Another Class question.
SA
sarmstrong13@mac.com
Thu, 15 Aug 2002 07:58:04 -0500
Ok.
Now the light is starting to come on.
So in the global namespace, I first want to make an instance of the class,
then I can pass on data to each of the classes functions for data
manipulation. The result of which is assigned to the instance?
So one last question(I hope;)):
If you have two classes, I'll try to keep it simple but I'm sure this can be
scaled upwards, and you create an instance for each, how would you pass data
from on instance to the next?
Is this done by assignment?
For example(really general):
class 1: #The first class
...
class 2: #The second class
...
x = 1() #create instance of first class
y = 2() #create instance of second class
x(..) #do some work on some data through this instance
y(x) #pass result from first instance to second for more manipulation?
Does this work? Is there a better way? Could I put the second class in line
first and make it a subclass of SuperClass 1 instead?
(Ok I lied. I thought of a few more question as I was writing out my
example. So sue me ... ;) )
Thanks in advance.
SA
--
"I can do everything on my Mac I used to on my PC. Plus a lot more ..."
-Me