• 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
Drag-n-Drop file into text field
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drag-n-Drop file into text field


  • Subject: Drag-n-Drop file into text field
  • From: "Prem Chopra" <email@hidden>
  • Date: Tue, 3 Jun 2003 13:08:20 +0530

Hi,

In my Cocoa/Objective-C application, I have a Text Field and my requirement is
that if the user drags and drops a file into it, the text field will accept
the file and display the full path of it. For that, I have created a subclass
of NSTextField that behaves identically except for drag-n-drop. In the
subclass, I've overridden drag-n-drop methods like "draggingEntered",
"prepareForDragOperation", "performDragOperation", "concludeDragOperation"
etc. The application is working fine. But the only problem is that once the
user clicks the cursor into the Text Field box, making it active as an
editable field, dragging and dropping into it becomes disabled.

If anybody can suggest me the fix, it will be a great help.

TIA,
Prem
_______________________________________________
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: Drag-n-Drop file into text field
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: User friendly machine name (gestaltUserVisibleMachineName?) [SOLVED]
  • Next by Date: Re: Drag-n-Drop file into text field
  • Previous by thread: Examples of NSTypesetter/NSLayoutManager subclasses?
  • Next by thread: Re: Drag-n-Drop file into text field
  • Index(es):
    • Date
    • Thread