• 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
Getting hitTest of Subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Getting hitTest of Subview
      • From: j o a r <email@hidden>
    • Re: Getting hitTest of Subview
      • From: j o a r <email@hidden>
  • Prev by Date: hand cursors
  • Next by Date: Re: Getting hitTest of Subview
  • Previous by thread: Re: hand cursors
  • Next by thread: Re: Getting hitTest of Subview
  • Index(es):
    • Date
    • Thread