Programming help

PoweMACuser

Registered
I have spent a lot of time to find the API funtion but still not success yet.

My purpose is

1. when use mouse to point to any where, in which there is a word, it will return the word the mouse points to.

2. get the hightlighted word anywhere on the screen.

I have searched all the TSM documentations and still can't find the API I need.

Any one can help?
 

strobe

Puny Member
If I understand what you're saying, what you want is impossible. This is true for every OS on the planet.

The only thing which would come close is if you patched Cocoa so that all Views containing text would report on every mouse movement the word, if any, that the cursor is hovering over. I guess the same thing could also be done with Carbon's TextEdit and MLTE, but what's the point?
 

JSR COUT

Registered
Why would he have to patch Cocoa? Couldn't he just derive a new view class from NSView and add the functionally himself?
 

PoweMACuser

Registered
Originally posted by JSR COUT
Why would he have to patch Cocoa? Couldn't he just derive a new view class from NSView and add the functionally himself?
I still don't have the technique to derive the class. Otherwise I will do it now. I won't spend so much time to look through the documentations.

if you can derive it, can you post the code?

thanks
 
Top