Re: Single Click not Called on NSTextAttachment
Re: Single Click not Called on NSTextAttachment
- Subject: Re: Single Click not Called on NSTextAttachment
- From: Keary Suska <email@hidden>
- Date: Thu, 08 Aug 2013 14:47:39 -0600
On Aug 8, 2013, at 8:37 AM, Gordon Apple wrote:
> I¹ve added resize capability for image attachments in my subclass of
> NSTextView. Currently, this gets triggered by a double-click on the
> attachment. I would prefer to do this with a single-click so I can reserve
> double-click for launching an editor for some types of attachments. (I
> suppose I could use option-double-click.) However, for some reason, the
> single-click delegate method never gets called. What could interfere with
> this?
>
> This is in a floating textView for editing text objects.
> ³allowsImagingEditing² is set, although I¹ve never been clear on its
> purpose.
In my experience, the delegate methods don't always work. You may have to subclass the cell and implement mouse tracking methods such as -wantsToTrackMouseForEvent:inRect:ofView:atCharacterIndex: and -trackMouse:inRect:ofView:atCharacterIndex:untilMouseUp:. At least, this is what I had to do for my custom cells...
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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