I figured it out. The firstResponder had what I needed after all. I could have sworn that I had tried this before. Anyway, it works now. Thanks for your help and patience.<br><br>kirt<br><br><br>@implementation ViWindow
<br><br>- (void)sendEvent:(NSEvent *)theEvent<br>{<br> if ( [theEvent type] == NSKeyDown ) {<br> if ( [[theEvent charactersIgnoringModifiers] characterAtIndex: 0] == 'h' ) {<br> NSLog( @"we are trying to move left." );
<br> // This is the way to call the virtual methods.<br> [[self firstResponder] performSelector: @selector(moveLeft:) withObject: self];<br> } else {<br> [super sendEvent:theEvent];
<br> }<br> } else {<br> [super sendEvent:theEvent];<br> }<br>}<br><br>@end<br><br><br><br><br><br><br><br><br><br><div><span class="gmail_quote">On 3/31/07, <b class="gmail_sendername">Kirt Fitzpatrick
</b> <<a href="mailto:kirt.fitzpatrick@gmail.com">kirt.fitzpatrick@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have created a new project that distills out only the minimum code needed for this plugin to send a message to the active window. You can download it <a href="http://fowpas.net/ViMate.zip" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
here</a> (<a href="http://fowpas.net/ViMate.zip" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://fowpas.net/ViMate.zip</a>). It of course does not work but I am hoping that someone may be able to tell me why. Here is the most relevant code.<br><br><br><br>@implementation ViPlugin<br>- (id)initWithPlugInController:(id <TMPlugInController>)aController
<br>{<br> NSLog( @"we have lift off!" );<br> [ViWindow poseAsClass:[NSWindow class]];<br> <br> return [super init];<br>}<br>@end<br><br><br><br><br><br>@implementation ViWindow<br>- (void)sendEvent:(NSEvent *)theEvent
<br>{<br> if ( [theEvent type] == NSKeyDown ) {<br> if ( [[theEvent charactersIgnoringModifiers] characterAtIndex: 0] == 'h' ) {<br> NSLog( @"we are trying to move left." );<span class="q">
<br> [[NSApplication sharedApplication] sendAction: @selector(moveLeft:) to: nil from: self];
<br></span> } else {<br> [super sendEvent:theEvent];<br> }<br> } else {<br> [super sendEvent:theEvent];<br> }<br>}<br>@end<br><br><br><br><br>thanks<br><span class="sg">kirt<br><br>
</span></blockquote></div><br>