Re: How to get the word under the mouse pointer?
Re: How to get the word under the mouse pointer?
- Subject: Re: How to get the word under the mouse pointer?
- From: Tommy Nordgren <email@hidden>
- Date: Fri, 7 Dec 2007 04:14:49 +0100
On 7 dec 2007, at 03.16, James Chen wrote:
Hi all,
I'd like to do something like "Look up in Dictionary" (crtl + cmd +
D by
default), which will display a dictionary panel according to the
word under
the mouse.
Does anyone know how to do it?
Any idea will be very appreciated!
Thanks.
Best Regards,
James Chen
Presentation Product Division
TEL: +886 2 22263630 ext 8538
FAX: +886 2 22267241
Mailto: email@hidden
http://www.avermedia.com
AVerMedia Technologies, Inc.
Call the following NSTextView method:
characterIndexForInsertionAtPoint:
Then scan scan backwards and forwards in the text for word boundaries.
-------------------------------------
This sig is dedicated to the advancement of Nuclear Power
Tommy Nordgren
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden