• 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: Drag-and-drop onto an NSTextField?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag-and-drop onto an NSTextField?


  • Subject: Re: Drag-and-drop onto an NSTextField?
  • From: Sandor Szatmari via Cocoa-dev <email@hidden>
  • Date: Fri, 31 Jul 2020 19:49:55 -0400

For NSTexrField I have always created a subclass for my textfields

I call -registerForDraggedTypes: in -awakeFromNib in the subclass

And then to accept the drag implement the method in the sublclass

    -(NSDragOperation)draggingEntered:(id)sender

If there’s an easier or better it’d be cool to learn about it

Sandor

> On Jul 31, 2020, at 19:29, Carl Hoefs via Cocoa-dev
> <email@hidden> wrote:
>
> Why is drag-and-drop onto an NSTextField enabled only when it has focus?
>
> Is there any way around this?
>
> -Carl
>
> _______________________________________________
>
> 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
_______________________________________________

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

References: 
 >Drag-and-drop onto an NSTextField? (From: Carl Hoefs via Cocoa-dev <email@hidden>)

  • Prev by Date: Drag-and-drop onto an NSTextField?
  • Next by Date: Re: Drag-and-drop onto an NSTextField?
  • Previous by thread: Drag-and-drop onto an NSTextField?
  • Next by thread: Re: Drag-and-drop onto an NSTextField?
  • Index(es):
    • Date
    • Thread