Hi
I'm trying my hand at implementing some basic LCL widgets using the
fpGUI widgetset. I've never done this before! I have read the LCL
Internals wiki page. I can't seem to see what I am doing wrong? I
followed the wiki page to the letter.
In FpGuiWSStdCtrls.pas I implemented the following for TCustomEdit.
The 'writeln' statements are for debug only.
{ TFpGuiWSCustomEdit }
class function TFpGuiWSCustomEdit.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
lEdit: TFEdit;
begin
writeln('>>> ' + Classname + '.CreateHandle');
lEdit := TFEdit.Create(AWinControl);
Result := THandle(lEdit);
writeln('<<< ' + Classname + '.CreateHandle');
end;
I also uncommented the line in the Initialization section
RegisterWSComponent(TCustomEdit, TFpGuiWSCustomEdit);
I can compile the LCL against fpGUI without problems. Creating a new
application, set the widgetset to 'fpgui', then drop a TEdit on the
main form and compile. The compiling on the test project also goes
fine.
Running the test project gives loads of errors. In the list of
errors, I don't even see the 'writeln' statements I added, so don't
even think it is reaching that far. I did exactly as the LCL
Internals wiki pages said.
Removing the TEdit and adding a TButton, the project runs fine. As
soon as I add a TEdit, I get the crash. Any clues?
List or errors I get:
============================================
[EMAIL PROTECTED] fpgui_lcl: ./project1
fpGFX/X11: TXWindow.SetSize is not properly implemented yet
ERROR in LCL: Handle creation failed creating Edit1:TEdit
Creating gdb catchable error:
$080A1218 RAISEGDBEXCEPTION, line 806 of lclproc.pas
$080CBE50 TWINCONTROL__CREATEWND, line 5182 of ./include/wincontrol.inc
$080EF43A TCUSTOMEDIT__CREATEWND, line 31 of ./include/dockzone.inc
$080CBA65 TWINCONTROL__CREATEHANDLE, line 5116 of ./include/wincontrol.inc
$080CC90F FINDCHILDFIXATEDSIDES, line 1762 of ./include/wincontrol.inc
$080CBF99 TWINCONTROL__CREATEWND, line 5208 of ./include/wincontrol.inc
$08063991 TSCROLLINGWINCONTROL__CREATEWND, line 31 of forms.pp
$08067B99 TCUSTOMFORM__CREATEWND, line 1717 of ./include/customform.inc
$080688B9 TFORM__CREATEWND, line 2023 of ./include/customform.inc
[FORMS.PP] ExceptionOccurred
Sender=EInvalidOp
Exception=Invalid floating point operation
Stack trace:
$080A1242 RAISEGDBEXCEPTION, line 807 of lclproc.pas
$080CBE50 TWINCONTROL__CREATEWND, line 5182 of ./include/wincontrol.inc
$080EF43A TCUSTOMEDIT__CREATEWND, line 31 of ./include/dockzone.inc
$080CBA65 TWINCONTROL__CREATEHANDLE, line 5116 of ./include/wincontrol.inc
$080CC90F FINDCHILDFIXATEDSIDES, line 1762 of ./include/wincontrol.inc
$080CBF99 TWINCONTROL__CREATEWND, line 5208 of ./include/wincontrol.inc
$08063991 TSCROLLINGWINCONTROL__CREATEWND, line 31 of forms.pp
$08067B99 TCUSTOMFORM__CREATEWND, line 1717 of ./include/customform.inc
$080688B9 TFORM__CREATEWND, line 2023 of ./include/customform.inc
$080CBA65 TWINCONTROL__CREATEHANDLE, line 5116 of ./include/wincontrol.inc
$080CC90F FINDCHILDFIXATEDSIDES, line 1762 of ./include/wincontrol.inc
$0806D692 TAPPLICATION__CREATEFORM, line 1585 of ./include/customform.inc
$08049A0F main, line 15 of project1.lpr
TApplication.HandleException Invalid floating point operation
Stack trace:
$080A1242 RAISEGDBEXCEPTION, line 807 of lclproc.pas
$080CBE50 TWINCONTROL__CREATEWND, line 5182 of ./include/wincontrol.inc
$080EF43A TCUSTOMEDIT__CREATEWND, line 31 of ./include/dockzone.inc
$080CBA65 TWINCONTROL__CREATEHANDLE, line 5116 of ./include/wincontrol.inc
$080CC90F FINDCHILDFIXATEDSIDES, line 1762 of ./include/wincontrol.inc
$080CBF99 TWINCONTROL__CREATEWND, line 5208 of ./include/wincontrol.inc
$08063991 TSCROLLINGWINCONTROL__CREATEWND, line 31 of forms.pp
$08067B99 TCUSTOMFORM__CREATEWND, line 1717 of ./include/customform.inc
$080688B9 TFORM__CREATEWND, line 2023 of ./include/customform.inc
$080CBA65 TWINCONTROL__CREATEHANDLE, line 5116 of ./include/wincontrol.inc
$080CC90F FINDCHILDFIXATEDSIDES, line 1762 of ./include/wincontrol.inc
$0806D692 TAPPLICATION__CREATEFORM, line 1585 of ./include/customform.inc
$08049A0F main, line 15 of project1.lpr
fpGFX/X11: TXWindow.SetSize is not properly implemented yet
[FORMS.PP] ExceptionOccurred
============================================
--
Graeme Geldenhuys
There's no place like S34° 03.168' E018° 49.342'
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives