[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImageView & dragging

From: Fred Kiefer
Subject: NSImageView & dragging
Date: Mon, 16 Jan 2012 13:03:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0

On Cocoa the NSImageView implements the dragging target methods but is itself not able to function as a dragging source. You have to implement a subclass to get this behaviour. On GNUstep we have had both sides implemented for a long time now. This could lead to a problem when porting over from Cocoa, if an NSImageView was editable (that is, was allowed to receive a dropped image) on GNUstep it could as well start a drag operation.

Although I prefer the more symmetrical GNUstep approach I am now going to change the code and move the dragging source code into a subclass GSImageView, which will be exported by the NSImageView.h file. That way the NSImageView will behave more like its Cocoa counterpart, but the additional GNustep behaviour is still available for those that need it. You will only have to switch over to a different class, GSImageView instead of NSImaveView.

Are there any objections to this plan?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]