Fixed compiler warnings

ver1_5_1
Da Woon Jung 2007-12-02 11:23:16 +00:00
parent 3d72216ad8
commit cc9959ba52
3 changed files with 25 additions and 3 deletions

View File

@ -15,7 +15,21 @@
if ([delegate respondsToSelector:@selector(outlineView:shouldSelectItem:)] && [delegate outlineView:self shouldSelectItem:item])
[self selectRow:rowIndex byExtendingSelection:NO];
if ([delegate respondsToSelector:@selector(outlineView:contextMenuForItem:)])
return [delegate outlineView:self contextMenuForItem:item];
{
SEL sel = @selector(outlineView:contextMenuForItem:);
NSInvocation *invoc = [NSInvocation invocationWithMethodSignature:
[delegate methodSignatureForSelector: sel]];
if (invoc)
{
NSMenu *result;
[invoc setSelector: sel];
[invoc setArgument: &self atIndex: 2];
[invoc setArgument: &item atIndex: 3];
[invoc invokeWithTarget: delegate];
[invoc getReturnValue: &result];
return result;
}
}
}
} else {
[self deselectAll:self];

View File

@ -68,7 +68,15 @@ public:
BOOL hasMarkedText = NO;
if ([aTextObject respondsToSelector: @selector(hasMarkedText)])
{
hasMarkedText = [aTextObject performSelector: @selector(hasMarkedText)];
SEL sel = @selector(hasMarkedText);
NSInvocation *invoc = [NSInvocation invocationWithMethodSignature:
[aTextObject methodSignatureForSelector: sel]];
if (invoc)
{
[invoc setSelector: sel];
[invoc invokeWithTarget: aTextObject];
[invoc getReturnValue: &hasMarkedText];
}
}
[[aTextObject window] makeKeyAndOrderFront: nil];

View File

@ -60,7 +60,7 @@
}
- (void)selectItems:(NSArray*)items byExtendingSelection:(BOOL)extend {
int i;
unsigned i;
if (extend==NO) [self deselectAll:nil];
for (i=0;i<[items count];i++) {
int row = [self rowForItem:[items objectAtIndex:i]];