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 protected])

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