keyDown events and first responder
keyDown events and first responder
- Subject: keyDown events and first responder
- From: Greg Hulands <email@hidden>
- Date: Sun, 20 Oct 2002 00:30:09 +1000
Hi,
I am making an application that uses a similar architecture to that of
the Sketch example. I am adding a bezier path type graphic with an
editor. When it starts to edit I set the bezier path's editor to be
first responder (much like in SKTText), but I am unable to receive the
keyDown and keyUp messages. I have subclassed NSView for the editor and
return YES for accepts and did become first responder messages.
Below is the bezier path objects startEditing method
- (void)startEditingWithEvent:(NSEvent *)event
inView:(TACustomScreenLayoutView *)view
{
TABezierPathEditor *editor;
if (!sharedEditorInUse)
{
if (!sharedEditor)
sharedEditor = newEditor();
sharedEditorInUse = YES;
editor = sharedEditor;
}
else
editor = newEditor();
[editor setFrame:[self bounds]];
[editor setEditingPath:self];
[view addSubview:editor];
[view setEditingTelemetry:self editorView:editor];
[[view window] makeFirstResponder:editor];
[self didChange];
}
For some reason the editor view does not get the key messages, but it
does get called didBecomeFirstResponder.
Does anyone know what could be the problemo as I am currently stumped.
TIA,
Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.