Problem resizing an attachment in a NSTextView
Problem resizing an attachment in a NSTextView
- Subject: Problem resizing an attachment in a NSTextView
- From: Anders Sommer Lassen <email@hidden>
- Date: Wed, 19 May 2010 14:53:10 +0200
Hi,
I am working on a small project, which is about inserting a horizontal line into a NSTextView.
My first solution is to subclass NSAttachmentCell, and let the custom class do the drawing. I am here neglecting that an attachment would normally have a file or an image embedded (attached).
This works fine when adding the attachment to the textview.
The next problem is to resize the line by mouse-dragging.
I have tried overriding:
startTrackingAt:inView:
continueTracking:at:inView
stopTrackingAt:inView:mouseUp
But none of them are called when selecting the line and dragging.
Next, I tried overriding:
trackMouse:inRect:ofView:untilMouseUp:
When starting a drag operation, this method is called once.
The documentation states, for this method, that if "trackMouse" returns YES, "continueTracking" should be called until mouse is release.
But this did not happen.
Any help is welcome.
Kind regards,
Anders Lassen
_______________________________________________
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