Jump to content

jptf59

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by jptf59

  1. jptf59

    FMX Groupbox run-time display issue

    Hello, I am not an expert with FireMonkey and I am at a loss how to solve this problem : Config : Windows 10 - Win 32 platform - RAD STUDIO 10.4.2 Delphi ( Sydney) I use a few GroupBoxes that display nicefully in the EDI , like this : On the contrary at Run time they all show like this, that is with the headers struck out by the very frame of the groupbox whereas the textstyle is normall : I tried Groupboxes with other applications ( Test.dproj with TGroupBox) without any issue at run-time . I doubt whether this comes from my code because it does not impact the style of the GroupBoxes that remains by default but then what ??? Any idea ? I join the FMX text defining the groupbox above : object GroupBoxRoute: TGroupBox StyledSettings = [Family, Size, FontColor, Other] Position.X = 424.000000000000000000 Position.Y = 216.000000000000000000 Size.Width = 177.000000000000000000 Size.Height = 153.000000000000000000 Size.PlatformDefault = False Text = 'On Ground' TextSettings.Font.StyleExt = {00070000000000000004000000} TabOrder = 56 object Label55: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 24.000000000000000000 Position.Y = 32.000000000000000000 Size.Width = 33.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = 'COG' TabOrder = 42 end object Label56: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 24.000000000000000000 Position.Y = 72.000000000000000000 Size.Width = 33.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = 'SOG' TabOrder = 38 end object Label57: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 128.000000000000000000 Position.Y = 32.000000000000000000 Size.Width = 33.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = #176 TabOrder = 41 end object Label58: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 128.000000000000000000 Position.Y = 72.000000000000000000 Size.Width = 33.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = 'kts' TabOrder = 39 end object EdCOG: TEdit Touch.InteractiveGestures = [LongTap, DoubleTap] TabOrder = 45 Text = '0' TextSettings.Font.StyleExt = {00070000000000000004000000} TextSettings.FontColor = claBlueviolet TextSettings.HorzAlign = Center Position.X = 72.000000000000000000 Position.Y = 32.000000000000000000 Size.Width = 49.000000000000000000 Size.Height = 21.000000000000000000 Size.PlatformDefault = False StyledSettings = [Family, Size] end object EdSOG: TEdit Touch.InteractiveGestures = [LongTap, DoubleTap] TabOrder = 44 Text = '0' TextSettings.Font.StyleExt = {00070000000000000004000000} TextSettings.FontColor = claBlueviolet TextSettings.HorzAlign = Center Position.X = 72.000000000000000000 Position.Y = 72.000000000000000000 Size.Width = 49.000000000000000000 Size.Height = 21.000000000000000000 Size.PlatformDefault = False StyledSettings = [Family, Size] end object Label59: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 24.000000000000000000 Position.Y = 112.000000000000000000 Size.Width = 49.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = 'Drift' TabOrder = 36 end object Label60: TLabel StyledSettings = [Family, Size, FontColor] Position.X = 128.000000000000000000 Position.Y = 112.000000000000000000 Size.Width = 33.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False TextSettings.Font.StyleExt = {00070000000000000004000000} Text = #176 TabOrder = 40 end object EdDeriv: TEdit Touch.InteractiveGestures = [LongTap, DoubleTap] TabOrder = 43 Text = '0' TextSettings.Font.StyleExt = {00070000000000000004000000} TextSettings.FontColor = claBlueviolet TextSettings.HorzAlign = Center Position.X = 72.000000000000000000 Position.Y = 112.000000000000000000 Size.Width = 49.000000000000000000 Size.Height = 21.000000000000000000 Size.PlatformDefault = False StyledSettings = [Family, Size] end end Thanks JP
  2. jptf59

    FMX Groupbox run-time display issue

    Hello, I have found out the cause of the problem : the documentation of Embarcadero is not complete when it says , you can also use FMX.Types.GlobalUseGPUCanvas with windows. It should have been added : provided you do not use GroupBoxes ! Neither with Win32 nor Win64 will the GroupBoxes display correctly if FMX.Types.GlobalUseGPUCanvas is set to true. In my app, one of the units I used (third party) began with an initialization sequence setting the flag to true. Disabling it solved my problem. We can consider it's a FireMonkey bug, I think.
  3. Hello, Code that worked fine with DELPHI 7 now generates a floating point error in System.Pas provided with the RadStudio 10.3.3 installer. I use the Win32 platform. My code is as following and the problem lies with the round () instruction: if ( abs(extr.X-centre.X) < 19) and (abs(extr.Y-centre.Y) < 19) then begin if (angl >= 45) and (angl < 135) then dl := abs(20/cos(DEC_RAD (90-angl))) else if (angl >= 135) and (angl < 225) then dl := abs(20/cos(DEC_RAD (180-angl))) else if (angl >= 225) and (angl < 315) then dl := abs(20/cos(DEC_RAD (270-angl))) else dl := abs(20/cos(DEC_RAD (-angl))); extr.X := org.X + round ( (long - dl) *cos (DEC_RAD(angl))); extr.Y := org.Y - round ( (long - dl) * sin (DEC_RAD (angl))); end; The error occurs at the last line with the call to round (( long - dl) which calls in turn System._Round that is the intrinsec function compliant with dcc32 here : {**************************************************} { } { CodeGear Delphi Runtime Library } { } { Copyright(c) 1995-2019 Embarcadero Technologies, Inc. } { All rights reserved } { } { Copyright and license exceptions noted in source } { } {**************************************************} unit System; { Predefined constants, types, procedures, } { and functions (such as True, Integer, or } { Writeln) do not have actual declarations.} { Instead they are built into the compiler } { and are treated as if they were declared } { at the beginning of the System unit. } .............. ----------------------------------------------------- } { functions & procedures that need compiler magic } { ----------------------------------------------------- } {$IF defined(CPUX64) and defined(ASSEMBLER)} function _Round(Val: Extended): Int64; asm .NOFRAME CVTSD2SI RAX, XMM0 end; {$ELSEIF defined(X86ASMRTL)} procedure _ROUND; asm { -> FST(0) Extended argument } { <- EDX:EAX Result } SUB ESP,12 {$IFDEF IOS} // iOS/Simulator CALL FClearExcept {$ENDIF IOS} FISTP qword ptr [ESP+4] FWAIT {$IFDEF IOS} // iOS/Simulator CALL FCheckExcept {$ENDIF IOS} I get the $C0000090 'floating point invalid operation at 0x00407847' that points to the FWAIT instruction at the end of the _ROUND proc. What is strange is that the first call to round (long - dl) does not generate any error ! I read in the comment here above that the ROUND procedure needs compiler magic. I do not know what it is and I cannot find it in the compiler options. What is compiler magic ? And all that works fine with Delphi 7. Thank you in advance for your help if you can. Regards JP
  4. Thank you for your help that was good sense. I discovered that the issue lies in my input data that was empty at times and not in System.pas ! Problem solved ! Thank you again JP
×