Jump to content

Cristian Peța

  • Content Count

  • Joined

  • Last visited

Community Reputation

17 Good

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Cristian Peța

    SVG Magic released

    Just realized that RiverSoft SVG Component does have an experimental unit just for this: using TCanvas to build a SVG.
  2. Cristian Peța

    SVG Magic released

    Beside FMX I would like to have a canvas to draw and behind to be generated a SVG. Like Windows Metafile.
  3. I think it should be min := data[i]; But it wouldn't be faster this? Why to check 200 times (i = 0)? min := data[0]; for i := Low(data) + 1 to High(data) do begin if (data[i] < min) then min := data[i]; end;
  4. Cristian Peța

    How to get the Currency Symbol in multiple platforms

    Yes. The language selected by the user...
  5. Cristian Peța

    How to get the Currency Symbol in multiple platforms

    I've made it some years ago. Not the best solution but it works for what I need. And not Linux. function GetOSLangID: String; {$IFDEF MACOS} var Languages: NSArray; begin Languages := TNSLocale.OCClass.preferredLanguages; Result := String(TNSString.Wrap(Languages.objectAtIndex(0)).UTF8String); Result := UpperCase(Result.Substring(0, 2));//only first two chars end; {$ENDIF} {$IFDEF ANDROID} var LocServ: IFMXLocaleService; begin if TPlatformServices.Current.SupportsPlatformService(IFMXLocaleService, IInterface(LocServ)) then Result := LocServ.GetCurrentLangID else Result := 'EN'; Result := UpperCase(Result.Substring(0, 2));//only first two chars end; {$ENDIF} {$IFDEF MSWINDOWS} var buffer: MarshaledString; UserLCID: LCID; BufLen: Integer; begin // defaults UserLCID := GetUserDefaultLCID; BufLen := GetLocaleInfo(UserLCID, LOCALE_SISO639LANGNAME, nil, 0); buffer := StrAlloc(BufLen); if GetLocaleInfo(UserLCID, LOCALE_SISO639LANGNAME, buffer, BufLen) <> 0 then Result := buffer else Result := 'EN'; StrDispose(buffer); Result := UpperCase(Result.Substring(0, 2));//only first two chars end; {$ENDIF}
  6. You can. But it will be drawn after the control is returned to UI.
  7. Cristian Peța

    10.3.1 has been released

    I can live with Error Insight garbage but when I tried inline variables in a 300k LOC project I removed them immediately because Ctrl-Click stopped working.
  8. Cristian Peța

    Delphi 5 FOR Loop problem (W10-64bit)

    Is EntryAge and RetireAge floating-point?
  9. Cristian Peța

    (Mis-)Behaviour of TStringHelper

    Wrong test case. s.LastIndexOf('Hello', 38) will search starting from 38 to the left. That means in this string 'Hello how are you, Hello how are you, H'. First occurrences is at 19 so it "Works As Expected". I know this is not as other implementations but you must specify this in report if you want a change. And this change can brake old code so it must be strongly justified.
  10. Cristian Peța

    10.3.1 has been released

    Steps should be something like: 1. Install RAD Studio from ISO image with Delphi iOS Platform and without OSX Platform. 2. PAServer20.0.pkg file is missing
  11. You haven't told what exactly is wrong and for me is working as expected. Sincerely I don't have an hour to lose to identify what's wrong. Specifically what should be expected? There is only one "Huh?" at "s.LastDelimiter('Hello')" but it returns 53 that is good. What's wrong? P.S. The truth is that Delphi's LastIndexOf is not documented and is working but not as implemented in other languages.
  12. Cristian Peța

    10.3.1 has been released

    https://quality.embarcadero.com/browse/RSP-14452 P.S. Probably only GetIt was fixed...
  13. Cristian Peța

    How to identify problem remotely

    madExcept does have a "check for frozen main thread" option. You can set the timeout in seconds. You will have a call stack.
  14. Cristian Peța

    Delphi 10.3 and the NOX emulator running Android 7

    Search for Logcat. But looks like starting from Android 4.1 reading logcat is no longer working without root access.