[Lazarus] FreePsacl App. Running Very Slow in WINCE6
Robin Hoo
robin.hoo.cn at gmail.com
Mon Apr 26 12:14:56 CEST 2010
Hi
Is this FPC behavior correct?
Apparently it works in Delphi, at least ESS Model prog uses it heavily.
The idea is to typecast controls like TForm and TTreeView to a local
TCrackControl just to reach the protected TControl.OnMouseDown.
type
TCrackControl = class(TControl) end; // <-- empty local class
var
found: TControl;
cc: TCrackControl;
and later:
// 'found' can be TForm or anything.
cc:=TCrackControl(found); // <-- error
cc.OnMouseDown(...
In Lazarus / FPC it gives 'RunError(219)', or the system becomes unstable.
(I think this created the previous problem instead of interfaces).
The typecast should logically work because the controls inherit from TControl
and OnMouseDown is defined there.
Juha
More information about the Lazarus
mailing list