Fixed compiler warnings
parent
3d72216ad8
commit
cc9959ba52
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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]];
|
||||
|
|
Loading…
Reference in New Issue