• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to centralize functionality more elegantly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Request for Guidance
  • Next by Date: (newbie question)10.1.5 -> 10.2
  • Previous by thread: Re: how to centralize functionality more elegantly?
  • Next by thread: Re: how to centralize functionality more elegantly?
  • Index(es):
    • Date
    • Thread