-
Content Count
217 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Cristian Peța
-
Too little details. Stock TLabel component doesn't work with right to left languages. I don't understand how it works on Android but if it does maybe on iOS is font related.
-
Parsing Google Search Results redux
Cristian Peța replied to David Schwartz's topic in Network, Cloud and Web
Here Google Search is gray (Available in Enterprise) and included in that 1 year subscription from EMBT, https://www.embarcadero.com/products/enterprise-connectors And you mean that this connection is not to a Google API? Why not? From Google API documentation: "Custom Search JSON API provides 100 search queries per day for free. If you need more, you may sign up for billing in the API Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day." "The search results include the URL, title and text snippets that describe the result. In addition, they can contain rich snippet information, if applicable. " https://developers.google.com/custom-search/v1/overview -
Pointers... loops...
Cristian Peța replied to Sonjli's topic in Algorithms, Data Structures and Class Design
I started with Basic. The next was Z80 assembler. But assembler opened my eyes and is a base of understanding how things works. P.S. I can't imagine that someone can do a good thing in Spring4D for example without understanding CPU and memory. Also if someone does not have this knowledge working with C or C++ is a waste of time in my opinion. Then better Java. -
Pointers... loops...
Cristian Peța replied to Sonjli's topic in Algorithms, Data Structures and Class Design
You need first to understand what a pointer is and how things like pointers and other types are stored into memory. Maybe diving a little in assembler will help you to understand what is under the hood. I can't imagine a good programmer that don't know a little how CPU works or how things are stored into memory. -
Pointers... loops...
Cristian Peța replied to Sonjli's topic in Algorithms, Data Structures and Class Design
First you need to know the maximum length of "rn" and allocate that maximum from start. Something like this: popmsg: array[0..100] of ODBALMMSG2; and call it like this: FConnection.ErrHandle := cnc_rdalmmsg2(FConnection.ConnHandle, -1, rn, @popmsg[0]); This way you don't need pointers. -
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?