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: Fri, 6 Sep 2002 23:12:05 -0700
Is the "(MainController*)" part actually necessary? Some code in my
program works with the equivalent of:
[[NSApp delegate] showStatus: @"You cannot do that."];
Take care,
Andrew Merenbach
On Friday, September 6, 2002, at 10:00 PM,
email@hidden wrote:
On Thu, 5 Sep 2002 20:34:52 +0200, Andreas Mayer <email@hidden>
said:
Am Donnerstag, 05.09.02 um 19:14 Uhr schrieb Matt Neuburg:
[(MainController*) [NSApp delegate] showStatus: @"You cannot do
that."];
Is there a more elegant way to be doing this? m.
What about ...
#define myApp (MainController *)[NSApp delegate]
[myApp showStatus:@"You could do this."];
Then again, maybe I don't understand what you mean by 'more elegant'.
No, I think you understand exactly what I mean by 'more elegant', and I
think this is just the answer I was looking for. :-) Thx - I'm not a C
person and I had simply forgotten about #define! 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.