I have a NSString * property named `tag' in my class Foo, and use Foo
instances to populate an NSOutlineView. In one delegate method of
NSOutlineView, I pass the `tag' property of an item to a method as an
NSString * argument as follows:
    - (void)outlineViewSelectionDidChange:(NSNotification *)aNotification
    {
        NSInteger row = [tagView selectedRow];
        if (row == -1) {
            return;
        }

        [filteredPosts release];
        filteredPosts = [[self filterPosts:postNodes WithTag:[[tagView
itemAtRow:row] tag]] retain];
        [postView reloadData];
    }
but a warning of "passing argument 2 of 'filterPosts:WithTag:' makes
pointer from integer without a cast" always pops up when compiling.

I guess it is caused by the fact that NSCell and NSView have a
NSInteger property named `tag'. However, since
  * the root class NSObject does not have such a property,
  * NSOutlineView's item is typed with id,
  * and my class Foo is a direct subclass of NSObject,
what makes XCode think the `tag' property of the item is an NSInteger?
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to