• 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 'n Drop 'n Delegation Dilemma
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag 'n Drop 'n Delegation Dilemma


  • Subject: Re: Drag 'n Drop 'n Delegation Dilemma
  • From: Brian Webster <email@hidden>
  • Date: Sun, 16 Jun 2002 09:53:44 -0500

On Saturday, June 15, 2002, at 10:39 PM, cocoa-dev-
email@hidden wrote:

Is there a way (as I am led to believe) to do this that is preferable
through a delegate? How would this be done?

I've always wondered why they chose not to implement the whole drag and drop interface in a delegate or some similar pattern. They've done so for table views and outline views, but for all other views, you have to subclass to get the functionality you want. You can create your own delegate-based drag and drop methods if you want, but you'll still have to subclass the view you're dragging to in order to pass the messages on to the delegate.

I've tried to implement the
methods in my simple controller class, set an NSTextField's delegate to
that class, but the methods are not called. Is this the right approach,
or am I missing something big?

You must implement the drag source methods on the view object itself. They will not automatically be passed on to the delegate, although you can pass them on yourself if that's the way you want to handle it.

Also, if there were two items in the
window that were draggable, would I need to implement the different drag
routines in another way?

I'm not quite clear what you mean by this question. Could you clarify a little?

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

  • Prev by Date: Re: Protecting Software w/ Software License Keys...
  • Next by Date: Re: [Q] SavePanel NSFileHandlingPanelCancelButton
  • Previous by thread: Drag 'n Drop 'n Delegation Dilemma
  • Next by thread: Re: Drag 'n Drop 'n Delegation Dilemma
  • Index(es):
    • Date
    • Thread