derive from wxDropTarget ?
Christian Buhtz
yspam at gmx.net
Sun Dec 3 04:22:50 PST 2006
On Sat, 2 Dec 2006 23:49:13 +0100, Vadim Zeitlin wrote:
> I don't think it's a good idea to make a special case. Right now the
> behaviour is maybe not flexible enough but easy to understand: the drop
> target is always deleted by the library.
It will be after the patch, too. The user (dev who use wx) does not have
to care about deleting the dropTarget because it is deleted by the
library. The library cares for itself if the target is deleted while the
destruction of a control (because the control IS the target) or in the
destructor of control (delete target; because it is a seperate object).
1. The "special" case would be handled by the lib itself. The user do
not have to care about it! It changes nothing on the way to use a
target!
2. The right not behavior is NOT easy to understand because a) it is bad
design to delete a object like this in a dtor (who knows If the user
deleted it some steps befor) and b) it is more logical to let the
control be the target itself!
Please remember my big problems to understand the DnD things.
3. The drop target is always deleted by the library and the behavior
outside of the lib is always the same. Nothing will be changed!
More information about the wx-dev
mailing list