Re: best practice to create Custom Objects represented by a image in a d-n-d operation
Re: best practice to create Custom Objects represented by a image in a d-n-d operation
- Subject: Re: best practice to create Custom Objects represented by a image in a d-n-d operation
- From: "Sandeep Chayapathi" <email@hidden>
- Date: Mon, 8 Dec 2008 16:40:46 -0500
Go for option #1, use a "custom drag type" (in your case ships) to
pasteboard. You could update the pasteboard with the array of dictionary
objects, the dictionary could hold the image/link to image and an identifier
field for the same.
Make sure you register you drag destination for your custom drap type. (
http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/Tasks/acceptingdrags.html
)
-- Sandeep
On Mon, Dec 8, 2008 at 1:11 PM, Gustavo Pizano
<email@hidden>wrote:
> Hello.
>
> I have in a view images of ships, and Im able to drag them to another view
> which is the sea board, now, what is better, to create the objects of the
> ships in the "shipsviewcontainer" and set the object in the Pasteboard, or,
> just have representative images in the "shipsviewcontainer" of each ship,
> and once dragged to the sea create the instances of the ship that the images
> represent. If the last one is correct Iw as thinking if how to know which
> Ship Object the images that is being dragged represents, (maybe by image
> Size? ) I dunno what do you think its better to do, if I explain my self
> good.
>
>
> Thanks
>
> Gus
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden