• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
keyDown events and first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Setting an NSDate with natural language string
  • Next by Date: Re: Setting an NSDate with natural language string
  • Previous by thread: Re: Setting an NSDate with natural language string
  • Next by thread: Could it really move? (Carbon Memory Manager)
  • Index(es):
    • Date
    • Thread