Paul Ishenin schrieb:
29.03.2012 14:52, Hans-Peter Diettrich wrote:
The current situation, and your arguments, read to the user like:
"We know that there exist bugs, and we know how to eliminate fatal
consequences, but we prefer to leave our code in unusable state."
This is how you see it. Read it so:
"We know that there exists bugs in the code outside LCL. We prefere the
bugs fixed in that code instead of adapting LCL for the bad written code".
Some "bugs" cannot be fixed in code. E.g. when a form or control is
docked in code, what should happen to its DragKind? When the DragManager
requires a properly initialized DragKind, in order to start the proper
operation, should the property of the control be changed, or should we
introduce distinct calls that would allow to dock non-dockable controls
programmatically? The patch here checks for an already set HostDockSite,
which definitely indicates that the control *is* already docked, and
adjusts the DragKind accordingly.
For the second problem, the illegal change of the mouse capture, what
should we consider as the reason for such bugs, and how to cure it? This
can be solved in two ways:
1) The DragManager ignores such changes.
2) The "dragging" state is checked in the control, before an attempt is
made to change the capture.
Obviously [1] is the simpler and more robust solution, because the
DragManager is always involved. Moving the "dragging" check somewhere
else, e.g. into the CaptureControl procedure, may result in more
trouble, and has to be checked for every single control.
DoDi
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus