• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem resizing an attachment in a NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Turning text tokens into single elements
  • Next by Date: Progress Indicator in Table View
  • Previous by thread: Re: Simulating Text Input
  • Next by thread: Progress Indicator in Table View
  • Index(es):
    • Date
    • Thread