Bundle class design question
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.