• 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
Bundle class design question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bundle class design question


  • Subject: Bundle class design question
  • From: Evan DiBiase <email@hidden>
  • Date: Mon, 24 Nov 2003 08:20:47 -0500

Hello, again.

I'm working on some code that would like to know information about an application bundle that's dragged in. I think I've figured out a pretty reasonable way of doing so (getting, primarily, the display name and version), and I'd like to encapsulate this information in a class.

At first, I needed to know whether an NSBundle was an application, so I added a category on NSBundle with an -(BOOL)isApplication method. This worked okay. Now, I'd like to add methods like -(NSString *)displayName and -(NSString *)version, but I'm not sure where to put them. The latter is, perhaps, more easily applicable to any bundle than the former, and I can see adding it to a category. I'm not sure where displayName belongs, though.

If I subclass NSBundle, creating EDApplicationBundle, my new class will have all kinds of bizarre creation methods like +mainBundle and +bundleForClass: that would be unlikely to return anything useful. A category would be the same way.

Is there something obvious that I'm missing?

Thanks,
Evan
_______________________________________________
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: Multithreading Bundles
  • Next by Date: About localizing nib files...
  • Previous by thread: Re: Unable to launch Installer package
  • Next by thread: About localizing nib files...
  • Index(es):
    • Date
    • Thread