Do I need Custom View inside a hud panel to drag-n-drop images ??
Do I need Custom View inside a hud panel to drag-n-drop images ??
- Subject: Do I need Custom View inside a hud panel to drag-n-drop images ??
- From: Gustavo Pizano <email@hidden>
- Date: Tue, 25 Nov 2008 19:43:25 +0100
Hello, well Im new to cocoa programing, but eager to learn, Im doing a
small project, a naval battle game, I have a HUD panel which contains
5 NSImageView, one per Ship,(Carrier, frigate,...etc), and I wish to
drag-ndrop those images which actually represents my objects in my
model, into the gameboard(which is a custom view) inside the main
window.
I think I know how to make the drag and drop, and the methods I must
implement to achieve that, the problem I have is that those methods
are from NSView,
like dragginExited:, prepareForDragOperation, and others, so I see
that the NSImageView is a subclass of NSControl;:NSView, I thought,
"Hey so let's put those methods mentioned above into the......." and
that was all, I tough then maybe lets make a category for NSImageView?
with those methods? but then I realize there could be problems with
the NSView methods,
SO Im wondering if I need a custom view inside the HUD panel, who will
contain the NSImageViews, and there implements the methods,
draggingEntered:, dragginExited:,preparedForDragginOperation: etc.
.. Or there is another way I could achieve this?
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