-
Content Count
412 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Cristian Peța
-
Parsing Google Search Results redux
Cristian Peța replied to David Schwartz's topic in Network, Cloud and Web
https://community.idera.com/developer-tools/b/blog/posts/enterprise-connectors-now-part-of-rad-studio-enterprise-architect-edition -
Parsing Google Search Results redux
Cristian Peța replied to David Schwartz's topic in Network, Cloud and Web
I see that Google Search is part of Enterprise Connectors from C-Data that is part of RAD Studio Enterprise and Architect editions now. Has someone tried this? https://www.embarcadero.com/products/enterprise-connectors -
I think that if an image viewer is not complaining it's OK. Are there other things to check? And yes, I tried https://en.delphipraxis.net/uploads/monthly_2019_10/11.jpg.a7ea4fc99c1ad313a4ff4d986ba246c9.jpg with 3 different viewers and no complains.
-
I see that when you click on a form their Action is executed. Action property was probably published for someone that will find something useful in this.
-
"Vcl.Forms.TForm.Action inherits from Vcl.Controls.TControl.Action" It's for buttons and menu items. You select an action defined in a TActionList object (centralized actions). It's strange to have this for TForm but this is like in FMX where any control can be a container for any control.
-
The beauty of class and record helpers
Cristian Peța replied to Rollo62's topic in RTL and Delphi Object Pascal
It's like passing an object as const. You can do what you want with the object because const is only for the reference. P.S. But compiler can decide to put this const into a registry or pass as reference. Nice to track down bugs... -
Cannot get correct path to Documents folder on Android using Delphi 10.3
Cristian Peța replied to jon_bondy's topic in RTL and Delphi Object Pascal
You haven't told us what TPath.GetDocumentsPath returns for you in 10.2. I suppose the same as in 10.3. And I suppose the same for TPath.GetSharedDocumentsPath. Do you see any difference between 10.2 and 10.3? Because targetSdkVersion is now 28 in your manifest and you need to ask permission for what you want to do. This is an Android OS request. Nothing to do with Delphi. -
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}