• 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
Respond to Click in TextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Respond to Click in TextView


  • Subject: Respond to Click in TextView
  • From: Michael Terry <email@hidden>
  • Date: Sat, 26 Aug 2006 22:33:49 -0700

Hello,

I'd like to respond to mouseDown events in a TextView, but just how is eluding me. In case some configuration error in my application was the culprit, I set up a fresh one.

In Interface Builder, I noticed that MyDocument is listed as the delegate for the NSWindow instance. That being the case, this is what I expected to happen when clicking on the running program's TextView: click event sent to TextView, forwarded to ScrollView, forwarded to NSWindow, and finally forwarded to the window's delegate MyDocument where it had been prepared to receive it with:

- (void)mouseDown:(NSEvent *)event
{
    NSLog(@"mouseDown: %d", [event clickCount]);
}

... in MyDocument.m. However, clicking in the TextView (or window) doesn't register anything in the log. What don't I understand?

Michael Terry



_______________________________________________
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


  • Follow-Ups:
    • Re: Respond to Click in TextView
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: how to display a window from separate nibs?
  • Next by Date: Re: NSData dataWithContentsOfMappedFile with huge files?
  • Previous by thread: Re: how to display a window from separate nibs?
  • Next by thread: Re: Respond to Click in TextView
  • Index(es):
    • Date
    • Thread