Object scope - or where to put objects that should always be accessible
Object scope - or where to put objects that should always be accessible
- Subject: Object scope - or where to put objects that should always be accessible
- From: Ole Voss <email@hidden>
- Date: Tue, 26 Oct 2004 23:16:09 +0200
I'm getting into Cocoa development and have a bit of a problem with the
object-structure. I see that objects are being instantiated by the nib (for
instance) but where do I put objects that I want to be globally accessible.
For example: I would like my program to establish a database connection
during its startup and keep this database object available throughout the
applications life. When the application terminates, the object should close
the database connection. Where do I instantiate this object? Should it be in
the 'main' Routine or is there a special place where I should put it.
Also, what about the other Objects that are brought to life by the nib
loader for instance. Are these objects accessible to all other objects?
It there any good place to read about object scope and all these things?
Please point me in the right direction. I don't want to bother anybody with
simple stuff ;-)
Regards,
Ole.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden