Re: Getting a reference to the data model from a delegate
Re: Getting a reference to the data model from a delegate
- Subject: Re: Getting a reference to the data model from a delegate
- From: mw <email@hidden>
- Date: Sun, 19 Jan 2003 08:55:28 -0500
On 1/19/03 5:02 AM, "Bill Cheeseman" <email@hidden> wrote:
>
on 03-01-18 9:10 PM, James DiPalma at email@hidden wrote:
>
>
>> From: Rob In der Maur <email@hidden>
>
>>
>
>> Now my question:
>
>> I'm having problems getting a reference back to my data model from a
>
>> delegate in a document based application, which also has a dedicated
>
>> NSWindowController class.
>
If this data model that you are talking about is the same data model as
described in the MVC paradigm, then couldn't you simply make the data model
class a singleton? This would just mean having a reference to itself in the
class, and then having a +sharedInstance method to return it. That way, no
matter where you are in your application, you can gain access to the data
model (as long as you include its header file ;-) ).
mw
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.