-
Content Count
330 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Cristian Peța
-
Actually LiveBindings replaced the data-aware controls overhead. With a worse one. But... that this was by design... this is something new to me.
-
Zero cost, fully automated secure off-site database backup (FireBird 3.0.4)
Cristian Peța replied to Yaron's topic in Databases
Was Task Scheduler not good enough for this? -
Was just bitten by this. ClientDataSet.Edit; ClientDataSet.FieldByName('Field').AsString := 'aa'; //exception "DataSet not in edit or insert mode" if debbuger is reading ClientDataSet.LogChanges property P.S. State is changed to dsBrowse when reading ClientDataSet.LogChanges
-
I don't understand what are you trying here. Delphi does't emit x86 code for Android. Are you using an ARM emulator? @John Kouraklis, Schokohase asked you if you have installed an ARM and not x86 Android. What exactly have you installed?
-
I was curious... Using a dataset is faster but this takes about 4 sec. on my machine. Second try about 14 sec. ListBox1.Items.BeginUpdate; for i := 1 to 100000 do ListBox1.Items.Insert(0, 'New string ' + i.ToString); ListBox1.Items.EndUpdate; But with TClientDataSet first 3 sec., second 8 sec.: if not ClientDataSet1.Active then begin ClientDataSet1.FieldDefs.Clear; ClientDataSet1.FieldDefs.Add('Time', ftDateTime); ClientDataSet1.FieldDefs.Add('Str', ftWideString, 100); ClientDataSet1.CreateDataSet; ClientDataSet1.AddIndex('Index1', 'Time', [], 'Time'); ClientDataSet1.IndexName := 'Index1'; end; ClientDataSet1.DisableControls; for i := 1 to 100000 do ClientDataSet1.AppendRecord([Now, 'New string ' + i.ToString]); ClientDataSet1.EnableControls; P.S. Second try adding more 100,000 lines to first.
-
If I understand right, this should do the job: ListBox1.Items.Insert(0, 'New string'); or ListBox1.Items.Add('New string');
-
Any Benchmarks Comparing Executable Speeds for MacOS 64 vs Win 64?
Cristian Peța replied to Steve Maughan's topic in RTL and Delphi Object Pascal
Not bad humor, but reality. I remember Mark Hoffman's attitude and I think he will never ever sold RemObjects to EMBT. Maybe after Greenland will be sold there will be a chance. -
IDE Fix Pack 6.4.3 breaks compilation
Cristian Peța replied to Primož Gabrijelčič's topic in Delphi Third-Party
I found it: " You can disable a patch by setting the global environment variable “IDEFixPack.DisabledPatches” to a semicolon separated list. The items for the list can be found in “Product information” memo in the IDE’s info dialog when you click on the “Compiler Speed Pack x86 5.96 for Delphi 10.2” entry in the “Installed products” listbox. It’s the string in the brackets (without the brackets). But not there are some dependencies that may cause crashes if you disable one patch but not a specific other (and only the source code knows those dependencies). " -
IDE Fix Pack 6.4.3 breaks compilation
Cristian Peța replied to Primož Gabrijelčič's topic in Delphi Third-Party
Maybe disabling patches one by one using IDEFixPack.DisabledPatches. But I don't know where to find a complete patch list. -
Disaster planning by archiving GetIt installers
Cristian Peța replied to Tom F's topic in Delphi IDE and APIs
In 10.2 I installed DosCommand and copied the sources from ''C:\Users\.....\Documents\Embarcadero\Studio\19.0\CatalogRepository\DOSCommand-1.3" to the 10.3 and installed manually. -
Refer to Form Control without using the Form unit?
Cristian Peța replied to Mike Torrettinni's topic in VCL
I think you need something like this procedure. And every unit with a form will use the unit where this procedure is located. Every form will use this procedure directly or will register itself for later translation. procedure TranslateForm(Form: TForm); var i, j: Integer; Frame: TFrame; begin for i := 0 to Form.ComponentCount - 1 do begin if (Form.Components[i] is TFrame) then begin Frame := TFrame(Form.Components[i]); for j := 0 to Frame.ComponentCount - 1 do begin if (Frame.Components[j] is TControl) and (TControl(Frame.Components[j]).Action = nil) then TranslateTControl(TControl(Frame.Components[j])) else if (Frame.Components[j] is TAction) then TranslateTAction(TAction(Frame.Components[j])); end; end else if (Form.Components[i] is TControl) and (TControl(Form.Components[i]).Action = nil) then TranslateTControl(TControl(Form.Components[i])) else if (Form.Components[i] is TMenuItem) and (TMenuItem(Form.Components[i]).Action = nil) then TranslateTMenuItem(TMenuItem(Form.Components[i])) else if (Form.Components[i] is TAction) then TranslateTAction(TAction(Form.Components[i])); end; end; -
Cannot login to Quality Central - who to contact?
Cristian Peța replied to A.M. Hoornweg's topic in General Help
Also no captcha: -
Bug in Delphi License Manager?
Cristian Peța replied to PeterPanettone's topic in Delphi IDE and APIs
I see only the order to be different but same items. Do I missed something? -
Just realized that RiverSoft SVG Component does have an experimental unit just for this: using TCanvas to build a SVG.
-
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