determining dragging source
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.