Re: clickCount question
Re: clickCount question
- Subject: Re: clickCount question
- From: James Quick <email@hidden>
- Date: Mon, 21 Jul 2003 21:47:00 -0400
On Monday, July 21, 2003, at 08:52 PM, Koen van der Drift wrote:
On Monday, July 21, 2003, at 04:49 PM, James Quick wrote:
Note that this does impose overhead, but not very much.
A message sent on an empty selection cause by a single click arrive
shortly after the double click time passes.
Thanks James,
The delay is no problem. There is another problem, though. I get a lot
of the following errors during runtime:
*** NSTimer ignoring exception 'NSInvalidArgumentException' (reason
'*** -[NSTextField methodSignatureForSelector:]: null selector') that
raised during posting of timer with target 18aacf0 and selector
'(null)'
Oops.
Yo Apple, are you guys gonna add syntax warnings for objective-c code
to Mail.app in Panther?
Well, I wrote that in Mail.app and after a quick visit to the compiler
found the bugs.
First, the initialization code is not being called, so of course it's
broken.
It's a good thing you did not mind the delay, because on a single click
it's probably inifinite!
First and biggest bug
the line
if (doubleClickTime = 0.0) {
should be
if (doubleClickTime == 0.0) {
next the selected range initialization is wrong change:
selectedRange = 1; //don't cancelPrevious thi is our first time.
to:
selectedRange = NSMakeRange(0,1); //don't cancelPrevious this
is our first time.
and you probably caught this one already if you're running it:
if (selectedRange.range == 0) {
it should be
if (selectedRange.length == 0) {
That should do it
_______________________________________________
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.