• 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
determining dragging source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

determining dragging source


  • Subject: determining dragging source
  • From: Koen van der Drift <email@hidden>
  • Date: Fri, 26 Jul 2002 10:29:48 -0400

Hi,

I my app the user can drag items from a palette to the main window to construct a graph. I only send a tag in the drag, and 'unpack' it when the drag is accepted. The tag is an NSString, so I want to make sure that not every string dragged into the image gets processed. How do I know which view is the sender if the sourceview is in another window ? I know that the NSDraggingInfo has a sender member and I can do if (sender != self), but I don't know how to test that for whatever view/window it is coming from. If this is not possible, at least I want to make sure that drag is within my app. How can that be accomplished?

While typing this, I realized that maybe the approach should be to test if the tag exists in my dictionary to see if the drag gets accepted. That's probably an easier way. This also allows me to drag (parts of) a graph between different documents.

any thoughts?


Oh, one more thing. How do I prevent my palette (an NSPanel) to respond to the Close command (Cmd-W)?


thanks,

- Koen.
_______________________________________________
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: Fwd: Metallic Windows ... Is Apple Breakin' the Rules?
  • Next by Date: Re: cocoa-dev digest, Vol 2 #999 - 13 msgs
  • Previous by thread: Re: Asynchronous I/O using NSFileHandle
  • Next by thread: Re: determining dragging source
  • Index(es):
    • Date
    • Thread