Delphi 10.2 fmx Android
Delphi 10.2 fmx Android
This very simple program to display styles
give me fmx segmentation fault(11)
when used from PopupBox
private
{ Private declarations }
resname: string;
style: TFMXObject;
This is OK <<<<<<<<<<<<
procedure TForm1.Button2Click(Sender: TObject);
//var
//style: TFMXObject;
begin
style := FMX.Styles.TStyleManager.GetStyleResource('GoldenGraphite'); <<<< OK
if style <> nil then
TStyleManager.SetStyle(style);
end;
This is bad segmentation fault(11) <<<<<
procedure TForm1.PopupBox1Change(Sender: TObject);
//var
//resname: string;
//style: TFMXObject;
begin
resname := PopupBox1.Text;
style := FMX.Styles.TStyleManager.GetStyleResource(resname); <<< BAD
if style <> nil then
TStyleManager.SetStyle(style);
end;
This very simple program to display styles
give me fmx segmentation fault(11)
when used from PopupBox
private
{ Private declarations }
resname: string;
style: TFMXObject;
This is OK <<<<<<<<<<<<
procedure TForm1.Button2Click(Sender: TObject);
//var
//style: TFMXObject;
begin
style := FMX.Styles.TStyleManager.GetStyleResource('GoldenGraphite'); <<<< OK
if style <> nil then
TStyleManager.SetStyle(style);
end;
This is bad segmentation fault(11) <<<<<
procedure TForm1.PopupBox1Change(Sender: TObject);
//var
//resname: string;
//style: TFMXObject;
begin
resname := PopupBox1.Text;
style := FMX.Styles.TStyleManager.GetStyleResource(resname); <<< BAD
if style <> nil then
TStyleManager.SetStyle(style);
end;
Can some one try this code since it is very simple
ReplyDeleteand verify the problem.
I run fine on win32
ReplyDeleteH Visli Win32 is not the problem !!! Android is
ReplyDeleteDelphi 10.2 fmx Android
Ok i am changing my question
ReplyDeleteIf i work with a button it is OK
however triggering PopupBox WITHOUT USING IT
give me fmx segmentation fault(11)
procedure TForm1.PopupBox1Change(Sender: TObject); <begin
//resname := PopupBox1.Text;
resname := 'GoldenGraphite';
style := FMX.Styles.TStyleManager.GetStyleResource(resname);
if style <> nil then
TStyleManager.SetStyle(style);
end;
Well after trying to solve the problem i put a timer
ReplyDeletewhich fixed the problem for 2-3 iterations
but it still ill behaved . So i droped the matter
and i prefer for now to assess my use of fmx for Android
against Android Studio.
Thanks
Sorry, this does not compile on my dev machine. I have 10.2 update 1 and android set as the target. First error is TstyleManager is not the name of a unit.
ReplyDeletesteve hughes Add FMX.Styles to the uses.
ReplyDeleteThis seem to work 3 Radiobuttons with no problems
ReplyDeleteprocedure TForm1.RadioButton1Click(Sender: TObject);
begin
with (Sender as TRadioButton) do
begin
resname := TRadioButton(Sender).Text;
style := FMX.Styles.TStyleManager.GetStyleResource(resname);//'GoldenGraphite');
if style <> nil then
TStyleManager.SetStyle(style);
end;