So until the other day I thought my objects instance variables were "Global Variables". My thinking was that if I had 2 or more Methods that needed to access the same variable, I would declare them "Globally" and instantiate them. If not I would declare them locally within the Method for temporary use. (like I learned in my Pascal class regarding the Scope or variables).
- Are object instance variables also know as global variables for that object? I seem to use them in that capacity and they function that way. But are they know as Global Variables too?
I have not learned how to use Singletons yet but I guess they store information "Globally" in my root controller which I can use to pass information to my different objects?
- Are there any good tutorials out there to learn how to use Singletons? I did google it but sometimes folks here have good resources too. This is my weekend project to learn.
Thanks!
- Are object instance variables also know as global variables for that object? I seem to use them in that capacity and they function that way. But are they know as Global Variables too?
I have not learned how to use Singletons yet but I guess they store information "Globally" in my root controller which I can use to pass information to my different objects?
- Are there any good tutorials out there to learn how to use Singletons? I did google it but sometimes folks here have good resources too. This is my weekend project to learn.
Thanks!