Recent

Author Topic: Lazarus Release 2.2.4  (Read 34738 times)

dssmex

  • Newbie
  • Posts: 4
Re: Lazarus Release 2.2.4
« Reply #30 on: February 25, 2023, 08:58:03 pm »
This has nothing to do with ARM processors. Show us some code - compilable code -... Then you will get more reasonable answers.

Just only, New Project- add an showmessage inside of OnShow Event and run the program in a raspberry pi 4. Sometimes the code inside onshow dont do nothing.

Code: Pascal  [Select][+][-]
  1. unit unit2;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs;
  9.  
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     procedure FormShow(Sender: TObject);
  16.   private
  17.  
  18.   public
  19.  
  20.   end;
  21.  
  22. var
  23.   Form1: TForm1;
  24.  
  25. implementation
  26.  
  27. {$R *.lfm}
  28.  
  29. { TForm1 }
  30.  
  31. procedure TForm1.FormShow(Sender: TObject);
  32. begin
  33.    ShowMessage('OnShow Work!');
  34.  
  35.    close;
  36. end;
  37.  
  38. end.  
  39.  

Thaddy

  • Hero Member
  • *****
  • Posts: 16185
  • Censorship about opinions does not belong here.
Re: Lazarus Release 2.2.4
« Reply #31 on: February 25, 2023, 10:07:51 pm »
Remove the close, because ShowMessage is not modal. That goes for every platform btw.
If I smell bad code it usually is bad code and that includes my own code.

dssmex

  • Newbie
  • Posts: 4
Re: Lazarus Release 2.2.4
« Reply #32 on: February 26, 2023, 01:40:36 am »
Remove the close, because ShowMessage is not modal. That goes for every platform btw.

This happen with or without close.

Bart

  • Hero Member
  • *****
  • Posts: 5468
    • Bart en Mariska's Webstek
Re: Lazarus Release 2.2.4
« Reply #33 on: February 26, 2023, 01:55:34 pm »
... because ShowMessage is not modal. That goes for every platform btw.

I probalbly misunderstand you here, but ShowMessage shows a modal dialog on all platforms AFAIK.

Bart

Thaddy

  • Hero Member
  • *****
  • Posts: 16185
  • Censorship about opinions does not belong here.
Re: Lazarus Release 2.2.4
« Reply #34 on: February 26, 2023, 02:28:43 pm »
On Linux it is not modal, as you can see from the emalgamation of popups while using -glh.
That should not happen if ShowMessage was modal.
If I smell bad code it usually is bad code and that includes my own code.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5755
  • Compiler Developer
Re: Lazarus Release 2.2.4
« Reply #35 on: February 26, 2023, 08:19:36 pm »
ShowMessage is supposed to be modal, because it's only supposed to return once the dialog window is closed. This means that (per thread) there can only be one such window open.

Thaddy

  • Hero Member
  • *****
  • Posts: 16185
  • Censorship about opinions does not belong here.
Re: Lazarus Release 2.2.4
« Reply #36 on: February 26, 2023, 08:24:07 pm »
Which isn't the case on Linux/gtk2..
I know all that.

A modal Window should halt execution before any other code gets executed in the same thread.
If I smell bad code it usually is bad code and that includes my own code.

Bart

  • Hero Member
  • *****
  • Posts: 5468
    • Bart en Mariska's Webstek
Re: Lazarus Release 2.2.4
« Reply #37 on: February 26, 2023, 10:57:59 pm »
Which isn't the case on Linux/gtk2..
Which makes both of us wrong.
You: stating that ShowMessage is, on every platform, not modal.
Me: stating it is modal.
But you seem to be worng on more platforms than I. So, I win  O:-)

Bart

dalfy

  • New Member
  • *
  • Posts: 10
Re: Lazarus Release 2.2.4
« Reply #38 on: March 18, 2023, 05:44:07 pm »
Hello.
Where can I place a proposal for the FPDoc documentation module?
Suggestion: after renaming the variable (by F2), as well rename the variables in the xml file.

Okoba

  • Hero Member
  • *****
  • Posts: 555
Re: Lazarus Release 2.2.4
« Reply #39 on: March 18, 2023, 06:01:15 pm »
You should create a feature request at https://gitlab.com/groups/freepascal.org/lazarus/-/issues

dalfy

  • New Member
  • *
  • Posts: 10
Re: Lazarus Release 2.2.4
« Reply #40 on: March 19, 2023, 12:36:07 pm »

omurolmez

  • New Member
  • *
  • Posts: 11
Re: Lazarus Release 2.2.4
« Reply #41 on: May 09, 2023, 04:05:22 pm »
Thank you for your great effort !
Using Lazarus and seeing its development day by day is such a joy.

 

TinyPortal © 2005-2018