• 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
I need more mouseDragged events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I need more mouseDragged events


  • Subject: I need more mouseDragged events
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Fri, 9 Apr 2004 02:22:28 +0200

Hi,

is there a way to get mouseDragged: events for an NSView more frequently? I'm implementing drawing tools, and my brush drawings look more like Polygons. I vaguely remember that someone had this problem before on the list, but I just can't find the messages in the archives anymore. Here's what I have tried so far:

1) Optimized my drawing code so it honors and invalidates only the rects that actually changed, thinking my drawing was taking too long.

2) Registered a tracking region for my NSView. Zilch improvement.

3) Changed my code to call NSApp's getNextEvent: in a tight loop in NSTrackingRunloopMode, processing only mouseDragged and mouseUp events. Didn't improve anything either.

Should one of these have done it? Has anyone got this working and can tell me what worked for them? Any sample code anywhere so I can check where I went wrong?

And if nobody has a clue, anyone know where among Apple's Dev Tools I can find a simple, usable profiler that just runs my app and tells me how much time it spent on average, longest and shortest in a certain method, or in a function called from it? I don't need anything nifty, just something like good ol' Metrowerks Profiler...
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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: I need more mouseDragged events
      • From: Dietmar Planitzer <email@hidden>
    • Re: I need more mouseDragged events
      • From: Bertrand Landry-Hétu <email@hidden>
  • Prev by Date: Re: Best way to obtain the width of a piece of text?
  • Next by Date: Re: Best way to obtain the width of a piece of text?
  • Previous by thread: Re: Custom View Tracking Rectangle
  • Next by thread: Re: I need more mouseDragged events
  • Index(es):
    • Date
    • Thread