Re: [Lazarus] BeginFormUpdate/EndFormUpdate should be public?

2018-12-23 Thread Juha Manninen via lazarus
On Sun, Dec 23, 2018 at 6:57 PM AlexeyT via lazarus
 wrote:
>
> %subj - they are not public so I must use now dirty code:
>
> procedure DoControlLock(Ctl: TWinControl);
> begin
>   {$ifdef fpc}
>   if Application.MainForm<>nil then
> TFormHack(Application.MainForm).BeginFormUpdate;
>   {$else}
>   Ctl.Perform(WM_SetRedraw, 0, 0);
>   {$endif}
> end;

Your code is somehow flawed.
TCustomForm.BeginFormUpdate should not be needed in application code.

Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] typo in LCL comment

2018-12-23 Thread Juha Manninen via lazarus
On Sun, Dec 23, 2018 at 6:48 PM AlexeyT via lazarus
 wrote:
> {--
>procedure TCustomForm.BeginFormUpdate;
>
>Called after all children handles are created.
>   
> --}
> procedure TCustomForm.ChildHandlesCreated;
> begin
> ...

I removed the comment block and moved the one line comment down.
In general those blocks are useless because they duplicate information
and they become outdated easily when a function is renamed.
This one was copied from another function and not changed accordingly.
Such comment blocks also occupy space which could be used for relevant
information and code.
Only a limited number of lines fit in one editor window.

Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] BeginFormUpdate/EndFormUpdate should be public?

2018-12-23 Thread AlexeyT via lazarus

%subj - they are not public so I must use now dirty code:

1.
   procedure DoControlLock(Ctl: TWinControl);
2.
   begin
3.
   {$ifdef fpc}
4.
   if Application.MainForm<>nil then
5.
    TFormHack(Application.MainForm).BeginFormUpdate;
6.
   {$else}
7.
  Ctl.Perform(WM_SetRedraw, 0, 0);
8.
   {$endif}
9.
   end;

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] typo in LCL comment

2018-12-23 Thread AlexeyT via lazarus

customform.inc

{--
  procedure TCustomForm.BeginFormUpdate;

  Called after all children handles are created.
 --}
procedure TCustomForm.ChildHandlesCreated;
begin

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus