Re: NSFilenamesPboardType
Re: NSFilenamesPboardType
- Subject: Re: NSFilenamesPboardType
- From: publiclook <email@hidden>
- Date: Sun, 16 Feb 2003 19:49:56 -0500
On Sunday, February 16, 2003, at 07:06 PM, Greg Casey wrote:
Thanks, Andreas for the pointer.
I've looked in the NSTableView.h header file to try and find out what
the exact method signature for "draggingSourceOperationMaskForLocal:"
is supposed to be, but can't find it. Any idea what type of parameter
it takes? What's the best way to find out something like this?
-gtc
On Sunday, February 16, 2003, at 05:28 PM, Andreas Mayer wrote:
The answer to your first question is revealed by the following:
A quick search on google with the words draggingSource apple produced
the following first results:
http://www.google.com/
search?as_q=draggingSource+apple&num=10&hl=en&ie=ISO-8859-
1&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_q
dr=all&as_occt=any&as_dt=i&as_sitesearch=&safe=images
The very first result:
http://developer.apple.com/techpubs/macosx/Cocoa/Reference/
ApplicationKit/ObjC_classic/Protocols/NSDraggingInfo.html
Constants
The following constants are defined by NSDraggingInfo and are used by
draggingSourceOperationMask :
Option
Meaning
NSDragOperationCopy
The data represented by the image can be copied.
NSDragOperationLink
The data can be shared.
NSDragOperationGeneric
The operation can be defined by the destination.
NSDragOperationPrivate
The operation is negotiated privately between the source and the
destination.
NSDragOperationMove
The data can be moved.
NSDragOperationDelete
The data can be deleted.
NSDragOperationEvery
All of the above.
NSDragOperationAll
Deprecated. Use NSDragOperationEvery instead.
NSDragOperationNone
No drag operations are allowed.
Prominent on that page is a section titled "Drag and Drop"
that leads to
draggingSourceOperationMaskForLocal:
- (unsigned int) draggingSourceOperationMaskForLocal: (BOOL) isLocal
This method is the only NSDraggingSource method that must be
implemented by the source object. It should return a mask, built by
combining the allowed dragging operations listed in NSDraggingInfos
Constants , using the C bitwise OR operator. You should use this mask
to indicate which types of dragging operations the source object will
allow to be performed on the dragged images data. A YES value for
isLocal indicates that the candidate destination object (the window or
view over which the dragged image is currently poised) is in the same
application as the source, while a NO value indicates that the
destination object is in a different application.
If the source does not permit any dragging operations, it should return
NSDragOperationNone .
There is a constants link takes you back to the constants you already
found.
The process used to find the answer answers your second question.
_______________________________________________
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.