Re: MacOSX-dev Digest, Vol 102, Issue 2

Adam Nash <[email protected]> Sun, 7 Oct 2012 13:47:12 -0700
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
unsubscribe

-----------
Adam Nash
[email protected]

http://www.linkedin.com/in/adamnash
http://www.facebook.com/adamnash
http://www.twitter.com/adamnash

On Oct 7, 2012, at 12:00 PM, [email protected] wrote:

> Send MacOSX-dev mailing list submissions to
> 	[email protected]
>=20
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.omnigroup.com/mailman/listinfo/macosx-dev
> or, via email, send a message with subject or body 'help' to
> 	[email protected]
>=20
> You can reach the person managing the list at
> 	[email protected]
>=20
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of MacOSX-dev digest..."
> Today's Topics:
>=20
>   1. Re: Dragging file promises (Fritz Anderson)
>   2. Re: Dragging file promises (Christiaan Hofman)
>=20
> From: Fritz Anderson <[email protected]>
> Subject: Re: Dragging file promises
> Date: October 6, 2012 12:35:58 PM PDT
> To: Christiaan Hofman <[email protected]>
> Cc: "macosx-dev ;cocoa-dev" <[email protected]>
>=20
>=20
> On 6 Oct 2012, at 6:24 AM, Christiaan Hofman <[email protected]> =
wrote:
>=20
>> I am trying to figure out how to drag file promises from views such =
as NSTableView. Before 10.6, I knew how to do this using =
NSFilesPromisePboardType and the =
namesOfPromisedFilesDroppedAtDestination: delegate methods.
>=20
> I'm having trouble getting my head around any of this. For instance, -
> namesOfPromisedFilesDroppedAtDestination: isn't a delegate method, but =
a part of a protocol. And I don't see how NSTableView would know to call =
dragPromised... "implicitly," given that it never knows that it contains =
things that could me converted into file promises.
>=20
> Could you post your code, please?
>=20
> 	=97 F
>=20
> --=20
> Fritz Anderson -- Xcode 4 Unleashed: 4.5 supplement in the works -- =
<http://x4u.manoverboard.org/>
>=20
>=20
>=20
>=20
>=20
> From: Christiaan Hofman <[email protected]>
> Subject: Re: Dragging file promises
> Date: October 6, 2012 1:45:45 PM PDT
> To: Fritz Anderson <[email protected]>
> Cc: "macosx-dev ;cocoa-dev" <[email protected]>
>=20
>=20
>=20
> On Oct 6, 2012, at 21:35, Fritz Anderson wrote:
>=20
>> On 6 Oct 2012, at 6:24 AM, Christiaan Hofman <[email protected]> =
wrote:
>>=20
>>> I am trying to figure out how to drag file promises from views such =
as NSTableView. Before 10.6, I knew how to do this using =
NSFilesPromisePboardType and the =
namesOfPromisedFilesDroppedAtDestination: delegate methods.
>>=20
>> I'm having trouble getting my head around any of this. For instance, =
-
>> namesOfPromisedFilesDroppedAtDestination: isn't a delegate method, =
but a part of a protocol.
>=20
> A protocol for a delegate (it's not a delegate you set explicitly, but =
the dragging source is implicitly used as the delegate for the drag =
operation.) Moreover, a corresponding method is a delegate (or more =
precisely datasource) method for NSTableView, which is really what it =
passes through in the end of the drop.
>=20
>> And I don't see how NSTableView would know to call dragPromised... =
"implicitly," given that it never knows that it contains things that =
could me converted into file promises.
>>=20
>=20
> If you put a NSFilesPromisePboardType on the dragging pasteboard from =
the NSTableView datasource method =
tableView:writeRowsWithIndexes:toPasteboard:  (remember, I am talking =
about dragging, and this is how you start a drag from NSTableView), then =
promised files are dragged automatically, which should go through the =
view method implicitly (i.e. you don't have to do that yourself, =
NSTableView does this for you.) And at the drop the =
namesOfPromisedFiles... method is called.
>=20
>=20
>> Could you post your code, please?
>>=20
>> 	=97 F
>=20
> It really should not matter that much what the code is. The bottom =
line from this is that I say that I know how to drag file promises using =
the old API. And my question is how to drag file promises using the new =
API and UTIs. I did not go into detail, and really think I shouldn't, =
because anyone who could answer my question would know what I am talking =
about, and the code should be straightforward but tedious. So if you =
don't know what I am talking about, you almost certainly won't be able =
to answer my question.
>=20
> Christiaan
>=20
>=20
>=20
>=20
> _______________________________________________
> MacOSX-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/macosx-dev