Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   FMX TStringGrid Invalid Pointer beim Schließen der Anwendung (https://www.delphipraxis.net/211209-fmx-tstringgrid-invalid-pointer-beim-schliessen-der-anwendung.html)

mlc42 13. Aug 2022 16:59

FMX TStringGrid Invalid Pointer beim Schließen der Anwendung
 
ich wollte etwas vermeintlich einfaches tun und ein FMX Stringrid
verwenden um ein paar Werte eingeben zu lassen.

Wen man in dem StringGrid ein Feld anclickt so das der Editor aufgeht
und dann die Anwendung beendet kommt ein Invalid Pointer.

Das passiert wenn ich das für Windows compiliere. Wie das bei Android aussieht
habe ich noch nicht getestet.

Delphi 10.4

Überseh ich da etwas grunsätzliches ?

baut man noch ein TEdit ein und clickt das vorm Beenden an kommt der Fehler nicht.



dfm

object Form3: TForm3
Left = 0
Top = 0
Caption = 'Form3'
ClientHeight = 480
ClientWidth = 640
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
DesignerMasterStyle = 0
object StringGrid1: TStringGrid
CanFocus = True
ClipChildren = True
Position.X = 16.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 593.000000000000000000
Size.Height = 393.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
RowCount = 10
Viewport.Width = 589.000000000000000000
Viewport.Height = 352.000000000000000000
object StringColumn1: TStringColumn
Header = 'Eins'
end
object StringColumn2: TStringColumn
Header = 'Zwei'
end
object StringColumn3: TStringColumn
Header = 'Drei'
Size.Width = 391.000000000000000000
end
end
object ColorAnimation1: TColorAnimation
Duration = 0.200000002980232200
StartValue = claWhite
StopValue = claWhite
end
end



pas

unit Unit1;

interface

uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, System.Rtti,
FMX.Grid.Style, FMX.Grid, FMX.Ani, FMX.Controls.Presentation, FMX.ScrollBox;

type
TForm3 = class(TForm)
StringGrid1: TStringGrid;
ColorAnimation1: TColorAnimation;
StringColumn1: TStringColumn;
StringColumn2: TStringColumn;
StringColumn3: TStringColumn;
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form3: TForm3;

implementation

{$R *.fmx}

end.

Harry Stahl 14. Aug 2022 20:00

AW: FMX TStringGrid Invalid Pointer beim Schließen der Anwendung
 
Ich habe es mal versucht nachzustellen. Unter Delphi 11.1 passiert das nicht.

mlc42 15. Aug 2022 07:41

AW: FMX TStringGrid Invalid Pointer beim Schließen der Anwendung
 
Danke fürs Testen. Dann muss ich mal updaten.
Ein Workaround ist im FormCloseQuery ein Grid.Setfocus zu machen.
Nicht schön, aber dann funkioniert es erstmal.


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz