Re: how to centralize functionality more elegantly?
Re: how to centralize functionality more elegantly?
- Subject: Re: how to centralize functionality more elegantly?
- From: Andrew Merenbach <email@hidden>
- Date: Thu, 5 Sep 2002 16:59:04 -0700
I use that method quite a few times in my program. If someone else has
a better solution, I'd be glad to hear it.
Also, is the (MainController*) actually needed? My code functions fine
with just this:
[[NSApp delegate] doAction:myAction];
Take care,
Andrew Merenbach
On Thursday, September 5, 2002, at 10:44 AM,
email@hidden wrote:
Message: 11
Date: Thu, 5 Sep 2002 10:14:20 -0700
To: email@hidden
From: Matt Neuburg <email@hidden>
Subject: how to centralize functionality more elegantly?
I have a few central (i.e. application-wide) functions, so I've put
them in
my NSApp delegate because that's appropriate and it's an object to
which
any other object can get a reference. In order to call these functions
I
typecast (I don't have to, but it's nice to eliminate warnings). So I
have
a lot of stuff like this:
[(MainController*) [NSApp delegate] showStatus: @"You cannot do
that."];
Is there a more elegant way to be doing this? m.
_______________________________________________
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.