Hi all,
I am having a problem with NSView/NSResponder class. I need to override the
NSView method acceptsFirstResponder method as from the documentation i have
read the NSResponder method returns NO by default. However with the code i am
using below i am getting a YES already without overriding. Just to brief you i
am creating a java application which creates a JFrame and then i am taking the
native part of AWT from it which is an NSView instance so i suppose it can be
considered as NSResponder and so i expect a NO.
NSView* nsview = (dsi_mac->cocoaViewRef);
if ([nsview acceptsFirstResponder]==YES)
printf("****Accepted first responder****\n");
and the output is
****Accepted first responder****
Another question is that i need to subclass the NSView and then create an
instance of this new subclass from the NSView i have from the the AWT, how can
i do is? Casting of NSView* to MyNSView* is not working, which i suppose it is
because i am just casting the pointer and not the object pointed to.
Any hints what is going on please?
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]