
May 10th, 2004, 11:53 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 17
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
help with objects visible to program.
I was wondering if there was some way to store the name of objects that are created in a class into a variable of some sort and then use that variable to call methods in another class.
For example I am making a T.V. / remote program and it has three classes
main: which sets up and runs the program
remote: which is for a remote object
television: which is for a television object
I want to create a television and remote object with the main class, and then allow the main class to tell the remote object what the name of the television object is, so it can dynamically use whatever name is given to call methods of the TV object to change its variables ei:channel, volume.
If something isn't clear, please say so and I will try to clarify.
Thanks.
|