Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
riginal Message > From: Martin Hewitson > To: Keith Blount > Cc: Martin Hewitson ; cocoa-dev@lists.apple.com > Sent: Tue, March 9, 2010 6:58:15 PM > Subject: Re: NSTextView attachments and context menus > > Hi Keith, > > >> As (the other) Martin says, you

Re: NSTextView attachments and context menus

2010-03-09 Thread Kyle Sluder
On Tue, Mar 9, 2010 at 10:58 AM, Martin Hewitson wrote: > Yes, I went down this route a little, but I was unable to figure out how to > check for an attachment at that character index. I guess I need to look at > this again. It seems like the elegant way to go since I only support Leopard > and

Re: NSTextView attachments and context menus

2010-03-09 Thread Keith Blount
best, Keith - Original Message From: Martin Hewitson To: Keith Blount Cc: Martin Hewitson ; cocoa-dev@lists.apple.com Sent: Tue, March 9, 2010 6:58:15 PM Subject: Re: NSTextView attachments and context menus Hi Keith, > As (the other) Martin says, you can subclass NSTextView and

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
Hi Keith, > As (the other) Martin says, you can subclass NSTextView and override > -menuForEvent: for this, which is the best way of doing it if you need to > provide support for systems running versions of OS X earlier than Leopard. If > you only need to support Leopard or above, though, Leop

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
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.

Re: NSTextView attachments and context menus

2010-03-09 Thread Keith Blount
Hi, As (the other) Martin says, you can subclass NSTextView and override -menuForEvent: for this, which is the best way of doing it if you need to provide support for systems running versions of OS X earlier than Leopard. If you only need to support Leopard or above, though, Leopard introduced

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Wierschin
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:",