Okay, so I've got a custom text view that's a subclass of NSView (not NSTextView). I've followed the instructions on this page:

http://developer.apple.com/documentation/Cocoa/Conceptual/InputManager/Tasks/TextViewTask.html#/ /apple_ref/doc/uid/20001040

I override acceptsFirstResponder to return YES, I override keyDown: to call interpretKeyEvents:, and I've implemented the NSTextInput protocol. I override all the mouse events and send those to the current input manager if it wants them (it never does). I even told the NSWindow to accept mouseMoved: events so I could forward them if the input manager wanted them (it doesn't). I've also implemented Services support, accepting NSStringPboardType data and providing it to services.

Anyway, this all works great for the most part. Text editing works fine, services work fine, everyone's happy, except for one thing - I want that dictionary widget that NSTextView has when you type command- control-D with the mouse hovering over a word. Since this is a system service and seems to get loaded into every Cocoa app, there must be a simple way to get my view to support it, but I'm drawing a blank as to what it is. I'm sure it's something simple, I'm just not sure what's the remaining piece of the puzzle that I need to implement. Anyone know what I'm forgetting?

Thanks,
Charles
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to