• 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
Re: Draggable buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draggable buttons


  • Subject: Re: Draggable buttons
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 2 Feb 2002 17:19:13 -0800

On Sat, 2 Feb 2002 12:52:15 -0500, Ben Chess <email@hidden> said:

>The only way to start a non-TableView drag that I know of is
>dragImage:at:offset:event:pasteboard:source:slideBack. The docs state
>clearly that this is to only be called from a mouseDown event. Throwing
>caution into the wind, I tried saving the mouseDown event and then not
>making a call to dragImage until a move occurs, but it doesn't work
>correctly. It seems to be capturing mouse movements, but the image
>dragged is never drawn.
>
>I'm doing something like this in an NSResponder subclass:
>-(void)mouseDown:(NSEvent *)theEvent
>-(void)mouseMoved:(NSEvent *)theEvent

In a similar situation recently I found the example in the docs
(HandlingMouseEvents.html) very helpful. Basically you just run your own
event loop inside the mouseDown event and see what develops. m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/


  • Follow-Ups:
    • Re: Draggable buttons
      • From: Serge Meynard <email@hidden>
  • Prev by Date: Re: MultiProcessing & Cocoa...
  • Next by Date: Re: Draggable buttons
  • Previous by thread: _iVar prefixes (was Re: Draggable buttons)
  • Next by thread: Re: Draggable buttons
  • Index(es):
    • Date
    • Thread