NSInputServer to intercept selection changes
NSInputServer to intercept selection changes
- Subject: NSInputServer to intercept selection changes
- From: Arthur VIGAN <email@hidden>
- Date: Thu, 11 May 2006 17:30:39 +0200
Hi,
I have written a very simple input manager with the help of the
HexInputServer example that works fine to intercept keystrokes after
implementing the NSInputServiceProvider protocol. Now I would like to
also implement the NSInputServerMouseTracker to be notified when the
selection is changed with the mouse. I wrote the following 3 methods
for test purpose:
- (BOOL)mouseDownOnCharacterIndex:(unsigned)index atCoordinate:
(NSPoint)point withModifier:(unsigned int)flags client:(id)sender
{
NSLog(@"mouse down");
return YES;
}
- (BOOL)mouseDraggedOnCharacterIndex:(unsigned)index atCoordinate:
(NSPoint)point withModifier:(unsigned int)flags client:(id)sender
{
NSLog(@"mouse dragged");
return YES;
}
- (void)mouseUpOnCharacterIndex:(unsigned)index atCoordinate:(NSPoint)
point withModifier:(unsigned int)flags client:(id)sender
{
NSLog(@"mouse up");
}
The mouseDownOnCharacterIndex:atCoordinate:withModifier:client: is
called, but the following message on the console:
2006-05-11 16:30:16.626 HexInputServer[15325] mouse down
2006-05-11 16:30:16.627 TextEdit[15324] *** -[NSTSMInputContext
window]: selector not recognized [self = 0x326420]
2006-05-11 16:30:16.628 TextEdit[15324] *** -[NSTSMInputContext
window]: selector not recognized [self = 0x326420]
And the
mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client: or
mouseUpOnCharacterIndex:atCoordinate:withModifier:client: are never
called. Does someone see what's wrong? There are no examples on Apple
website that explains how to use those methods. Has someone already
used those?
Thanks in advance,
-- Arthur;
--
Arthur VIGAN
email@hidden
_______________________________________________
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