Hi,
A singleton can be a good option for your shared data as suggested by
many people over here.
However, if you dont want a singleton, you can setup the Application
delegate as the data holder.
since application object can be accessed from anywhere in the app, you
can thus access your Arra
(replying to all this time)..
A singleton may be an appropriate solution to this problem. Their usage is not
perfect but few tools are.
That said, "DataHandler" should probably not be the singleton. That is the
class you created to read the file. If it doesn't make sense to create another
obje
On May 3, 2011, at 4:08 PM, Martin Batholdy wrote:
> Now how can I make sure that a global data-source is available independent
> from instances and their state?
> How can I share data between objects?
I would recommend making a singleton "manager" object that holds instances of
this data hand
Hi,
I am still new to objective-c and cocoa and the whole object-oriented approach.
So perhaps this is a weird question for you, but for me it is really important
to understand.
I have a small program with a DataHandler-class.
This class has methods to get data from a file on the disk and to sa