[Lazarus] What to replace Application.Processmessages with?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Nov 1 18:38:42 CET 2020


On Sun, 01 Nov 2020 11:37:14 +0100
Bo Berglund via lazarus <lazarus at lists.lazarus-ide.org> wrote:

> On Sun, 1 Nov 2020 10:20:11 +0100 (CET), Michael Van Canneyt via
> lazarus <lazarus at lists.lazarus-ide.org> wrote:
> 
> >> QUESTION:
> >> Is there a way in code to check if Forms is used?
> >> So it can be used instead of {$IFDEF NOGUI}  
> >
> >normally
> >
> >{$IF DECLARED(Forms)}
> >or
> >{$IF DECLARED(TForm)}
> >
> >should do the trick for you.  
> 
> A quick test:
> It seems like there is a problem with this...
> I added this to the end of a random function:
> 
>   {$IF DECLARED(TForm)}

Not yet supported by codetools, i.e. in the IDE. Codetools simply
evaluates "declared()" to true.

>     Application.ProcessMessages;
>   {$ENDIF}

Test compile by adding some invalid line like aaa;

Mattias


More information about the lazarus mailing list