-
Content Count
441 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Cristian Peța
-
Beside FMX I would like to have a canvas to draw and behind to be generated a SVG. Like Windows Metafile.
-
Best data structure to maintain a small list of items that have changing values...
Cristian Peța replied to Steve Maughan's topic in Algorithms, Data Structures and Class Design
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; -
How to get the Currency Symbol in multiple platforms
Cristian Peța replied to John Kouraklis's topic in Cross-platform
Yes. The language selected by the user... -
How to get the Currency Symbol in multiple platforms
Cristian Peța replied to John Kouraklis's topic in Cross-platform
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} -
When is a Delphi form actually visible to the user on Android?
Cristian Peța replied to Yaron's topic in Cross-platform
You can. But it will be drawn after the control is returned to UI. -
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.
-
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.
-
Is EntryAge and RetireAge floating-point?
-
Object inspector in Rio 10.3.1 looses a changed property value when selecting an other component
Cristian Peța replied to Tom Mueller's topic in Delphi IDE and APIs
Can't reproduce in 10.3.0 -
(Mis-)Behaviour of TStringHelper
Cristian Peța replied to Cristian Peța's topic in RTL and Delphi Object Pascal
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. -
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
-
https://quality.embarcadero.com/browse/RSP-14452 P.S. Probably only GetIt was fixed...
-
madExcept does have a "check for frozen main thread" option. You can set the timeout in seconds. You will have a call stack.
-
Delphi 10.3 and the NOX emulator running Android 7
Cristian Peța replied to Yaron's topic in Cross-platform
Search for Logcat. But looks like starting from Android 4.1 reading logcat is no longer working without root access. -
ANN: StyleControls VCL 4.26 released!
Cristian Peța replied to Almediadev Support's topic in Delphi Third-Party
Is there is a list of DevExpress controls that can be styled with VCL styles? -
Delphi 10.3 and the NOX emulator running Android 7
Cristian Peța replied to Yaron's topic in Cross-platform
If adb connection is not working then installing a Log visualizer from the market is the easiest solution to see the log. -
Delphi 10.3 and the NOX emulator running Android 7
Cristian Peța replied to Yaron's topic in Cross-platform
I used "Andoid Device Monitor" from SDK that installed with Delphi (starting \sdk\tools\monitor.bat) but it doesn't start with Rio installed SDK. At least for me. You either install Android Studio and use Logcat: https://developer.android.com/studio/debug/am-logcat Or other solutions: https://android.stackexchange.com/questions/14430/how-can-i-view-and-examine-the-android-log -
Delphi 10.3 and the NOX emulator running Android 7
Cristian Peța replied to Yaron's topic in Cross-platform
Time to look in the log. -
Delphi 10.3 and the NOX emulator running Android 7
Cristian Peța replied to Yaron's topic in Cross-platform
Is this emulator also emulating ARM code to x86? -
Is [weak] available in win32/win64
Cristian Peța replied to pyscripter's topic in RTL and Delphi Object Pascal
Yes, for interfaces, like article says. What help are you reading? Maybe it was not revised. -
Delphi 10.3 and AdMob blocking UI updates on older versions of Android
Cristian Peța replied to Yaron's topic in Cross-platform
Change "%minSdkVersion%" with "23" -
Linux + Delphi + Apache problem on 10.3
Cristian Peța replied to hsvandrew's topic in Cross-platform
Just tested on Ubuntu and now I see that you already tested console app. Looks like under Apache (supposing ICU is available) collation Strength or Case_Level is other that expected. See "Case Ordering" here: http://userguide.icu-project.org/collation/concepts -
Linux + Delphi + Apache problem on 10.3
Cristian Peța replied to hsvandrew's topic in Cross-platform
I have an Ubuntu installation that I tested in 10.2. But have you tested a simple console app? uses System.SysUtils; begin Writeln(AnsiCompareText('PARAMname','paramNAME')); Readln; end. -
After I run for the first time an app I often use I pin it to the taskbar (Windows 10) and then I click only on this icon. Left click will open it, if it's closed, and switch to if it's open. Middle click will open every time a new instance.
-
Actually I changed my code some years ago and now I'm painting on a bitmap scaled with Canvas.Scale (an UI Canvas) and then use Canvas.DrawBitmap() to draw UI.