Lazarus

Programming => LCL => Topic started by: powerpcer on October 07, 2022, 03:18:49 pm

Title: how to rebuild Controls.pp
Post by: powerpcer on October 07, 2022, 03:18:49 pm
i am trying to make some improve Controls,
so, make some code changing on it.
but i don't know how to rebuild them:
Controls.pp, wincontrol.inc,forms.pp

now, i am trying to rebuild IDE, but it won't work.
it shows:
menu.inc(99,99) Error: Compilation raised exception internally
Error: An unhandled exception occurred at $00000001004456F4:
Error: EAccessViolation: Access violation
Title: Re: how to rebuild Controls.pp
Post by: ccrause on October 07, 2022, 03:47:28 pm
Try make clean if building from command line, or select "Clean all" in the Configure "Build Lazarus" dialog if building from inside Lazarus.
Title: Re: how to rebuild Controls.pp
Post by: powerpcer on October 07, 2022, 06:27:21 pm
Try make clean if building from command line, or select "Clean all" in the Configure "Build Lazarus" dialog if building from inside Lazarus.
thanks ccrause.
all rebuild done.
but where to change the FORM component to add my new Event?
i have make some new call back for Form component.
Title: Re: how to rebuild Controls.pp
Post by: ccrause on October 07, 2022, 07:06:10 pm
but where to change the FORM component to add my new Event?
i have make some new call back for Form component.
The TForm definition is in lcl/forms.pp and most of the implementation code in /lcl/include/customform.inc.

Do you really have to modify the LCL code?  Would subclassing TForm not be a less intrusive way (in other words create a custom component based on TForm)?
Title: Re: how to rebuild Controls.pp
Post by: powerpcer on October 08, 2022, 03:53:08 am
but where to change the FORM component to add my new Event?
i have make some new call back for Form component.
The TForm definition is in lcl/forms.pp and most of the implementation code in /lcl/include/customform.inc.

Do you really have to modify the LCL code?  Would subclassing TForm not be a less intrusive way (in other words create a custom component based on TForm)?
yes, a subclass of TFORM is ok, but i need it can show in lcl component list and in design time.
forms.pp a TIMEFORM a subclass of TFORM was added. add 3 more property to it.
but then? how to make TIMEFORM as a component that show in LAZARUS?
Title: Re: how to rebuild Controls.pp
Post by: ccrause on October 08, 2022, 06:26:44 am
how to make TIMEFORM as a component that show in LAZARUS?
https://wiki.freepascal.org/How_To_Write_Lazarus_Component
Title: Re: how to rebuild Controls.pp
Post by: powerpcer on October 08, 2022, 10:43:57 am
thanks,
i had put that 3 event into current TFORM, it doesnt make any impact on my previous project.
TinyPortal © 2005-2018