• 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: Dragging to text fields
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging to text fields


  • Subject: Re: Dragging to text fields
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 15 Mar 2002 14:02:32 -0800

On Friday, March 15, 2002, at 11:57 AM, Bill Cheeseman wrote:

Well, here's a great surprise. It turns out that I can make it all work
exactly right just by having the draggingUpdated: protocol method make the
textfield over which the mouse is hovering the window's first responder.

That way I get entirely correct HI behavior automatically, apparently
because the field editor's built-in drag and drop support kicks in. When
the destination window is frontmost, each text field gets its focus ring as
I drag some text over it, and the text currently in the field is highlighted
(as the Aqua HI Guidelines require), and the insertion point moves within
the current text as I move the mouse around inside the text field. When I
drop the text, it lands in the right place, and it even triggers a connected
formatter if the dropped text is illegal. And all this also happens if the
window is in the background, except the blue focus ring doesn't show. (The
only hangup so far is that a formatter for the last field I dropped
something on is triggered when a second field becomes first responder.)

This seems so easy and so right that I can't believe it isn't documented
anywhere. Is this just a happy coincidence? Is something else going to jump
up and bite me?

This shouldn't be terribly surprising; after all, everything works correctly if the target field is already editing, right? We might even have done this by default before now, except for concerns about such things as the effects of suddenly ending editing on the source. It's something that probably deserves further consideration.

Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Dragging to text fields
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: Dragging to text fields (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Passing object graphs bycopy (was: DO, bycopy)
  • Next by Date: Terminating app when a document window has a sheet attached
  • Previous by thread: Re: Dragging to text fields
  • Next by thread: Re: Dragging to text fields
  • Index(es):
    • Date
    • Thread