Getting hitTest of Subview
Getting hitTest of Subview
- Subject: Getting hitTest of Subview
- From: Craig Bakalian <email@hidden>
- Date: Sat, 2 Nov 2002 06:23:07 -0500
Hi,
I am in design phase but have been toying with the NSView to get an
idea of how to design my app. I have a simple mouseUp event that adds
a subView to a NSView like so-
-(void)mouseUp: (NSEvent *) event
{
NSPoint loc = [event locationInWindow];
NSPoint vLoc = [self convertPoint: loc fromView: nil];
NSRect myRect = NSMakeRect(vLoc.x, vLoc.y, 100.0, 24.0);
CBNote *myNote = [[CBNote alloc] initWithFrame: myRect];
[self addSubview: myNote];
}
The CBNote is a subclass of NSView. It just draws a @"Hello World".
This works fine. OK, how do I get a hitTest for this added subview? I
feel lost in responders, locations, and superviews.
Craig Bakalian
_______________________________________________
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.