[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Renaissance: initStarndardStaticNameTable question
From: |
Chris Hanson |
Subject: |
Renaissance: initStarndardStaticNameTable question |
Date: |
Thu, 6 Nov 2003 18:35:08 -0600 |
In the initStarndardStaticNameTable function
(GSMarkupBundleAdditions.m) there's a lookup of first the NSApplication
class and then the "sharedApplication" selector. The class is then
made to perform the selector using +performSelector:.
This gives a compiler warning on Mac OS X 10.3 with Apple's GCC 3.3,
saying Class may not respond to +performSelector:. Obviously in this
case it will, but I was wondering why it was done this way.
It should be possible to replace the whole lookup dance with
[NSBundle registerStaticObject:[NSApplication sharedApplication]
withName:@"NSApp"];
shouldn't it? After all, initStandardStaticNameTable is always going
to run after the NSApplication class is loaded; the only reason to do
the kind of lookup the code is currently doing would be to prevent
NSApplication from being loaded, isn't it?
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: cmh@bDistributed.com
Outsourcing Vendor Evaluation | Phone: +1-847-372-3955
Custom Mac OS X Development | Fax: +1-847-589-3738
http://bdistributed.com/ | Personal Email: cmh@mac.com
- Renaissance: initStarndardStaticNameTable question,
Chris Hanson <=