delegate question
delegate question
- Subject: delegate question
- From: Dmitry Markman <email@hidden>
- Date: Sat, 7 Oct 2006 00:29:55 -0400
Hi
here is a situation
I have implementation of some NSView that I can use in Java
application via Apple's CocoaComponent java class
so
I don't have any nib file
I didn't create NSApplication (so I cannot create my NSApplication
class)
I didn't create NSWindow
that owns my NSView (so I cannot create my own NSWindow class)
I didn't set delegate for that NSWindow, but I definitely can get
instance of delegate
and I can substitute it by my own
I have to catch Command-C key-stroke
so I'll be able to handle copy command
solution that I can think of is to
create all delegate methods from NSWindow in my NSView
cache original NSWindow delegate
set my NSView as a new delegate for NSWindow
and delegate everything to former delegate
all I need is to do some small job in the keyUp/Down and after that
to send keyUp/Down
to the former delegate
but I wonder is there better way to do what I want?
(I read in that list about installing event handler, but I, probably
cannot do that too,
because I'm getting control way too late for doing that)
thanks in advance
Dmitry Markman
_______________________________________________
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