NSOutlineView byItem reference
NSOutlineView byItem reference
- Subject: NSOutlineView byItem reference
- From: Gerald Hanks <email@hidden>
- Date: Sun, 10 Apr 2005 22:51:32 -0600
<x-tad-smaller>I have a project in which I am using an NSOutlineView, some CharacterSet(s) (my own class) and some Character(s) (also my own class)
In my control object I have the delegate function:
</x-tad-smaller>- (void)outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item {
...
if([item isMemberOfClass:[CharacterSet class]]) {
NSEnumerator * characterEnum;
characterEnum = [[item characters] objectEnumerator];
...
}
...
}<x-tad-bigger>
</x-tad-bigger><x-tad-smaller>
When I compile this code I get the following warnings:
Controller.m:343: warning: multiple declarations for method `characters'
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:141: warning: using `-(NSString *)characters'
CharacterSet.h:35: warning: also found `-(NSArray *)characters'
/System/Library/Frameworks/AppKit.framework/Headers/NSTextStorageScripting.h:21: warning: also found `-(NSArray *)characters'
Controller.m:343: warning: `NSString' may not respond to `-objectEnumerator'
Everything runs the way it should since my CharacterSet class does in fact have a method 'characters' which returns the NSArray of characters, but I would like to know if there is a more appropriate way to do this so that I do not receive the compiler warnings.
As you can see I am fairly new to cocoa programming and would appreciate any and all suggestions.
--gerald</x-tad-smaller>Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden