On Mar 9, 2010, at 9:18 AM, Martin Wierschin wrote:

> Hello Martin,
> 
>> Now I want to offer the user a context menu to perform operations on the 
>> attachment (open, save, etc). So far I was unable to find a way to intercept 
>> a 'right-click' on the nstextview to offer a custom context menu.
> 
> You can subclass NSTextView and override "menuForEvent:", introspecting the 
> NSEvent and selection as you see fit.
> 
>> The context menu that appears has two additional menu items: "Import Image" 
>> and "Capture Selection from Screen".
> 
> Before you display your menu, call [menu setAllowsContextMenuPlugIns:NO] to 
> disable those kinds of additions.

Great! Thanks,

Martin

> 
> I hope that helps,
> 
> ~Martin
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
    Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





_______________________________________________

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 arch...@mail-archive.com

Reply via email to