On Sat, Apr 23, 2011 at 3:22 PM, Stephen J. Butler
<stephen.but...@gmail.com> wrote:
> Now the tools, on the other hand, were less smart in Xcode3 and below.
> Autocomplete, IB message browser, etc only knew about the
> messages/properties visible to the immediate code block (via import,
> include, etc). That Apple has fixed this in Xcode 4 to better match
> reality is a GOOD THING.

I'd say it is not a good thing as it stands, because all it does is
make it more likely that you're going to run into a compiler error in
the next five minutes. There's no indication that the method you're
trying to call is declared in a header you haven't imported. There's
just a generic "Could not find method -someCategoryMethod". Visual
Studio will at least automatically add using directives (similar in
purpose to Objective-C #import statements) if you attempt to reference
an identifier that it knows about but is in a namespace you haven't
imported yet.

Discussion about Xcode 4's behavior of showing all category methods
regardless of #import directives really belongs on the xcode-users
list, in the Developer Forums at http://devforums.apple.com , and/or
in the Bug Reporter at http://bugreport.apple.com.

Now, as for runtime behavior, as Stephen said it has *always* been the
case that the mere act of loading code containing a category code will
add that category's methods to the class, regardless of the #import
directives used at compile time.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to