Jump to content

Cristian Peța

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Cristian Peța

  1. Cristian Peța

    Arab in iOS

    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.
  2. Cristian Peța

    Parsing Google Search Results redux

    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
  3. Cristian Peța

    Pointers... loops...

    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.
  4. Cristian Peța

    Pointers... loops...

    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.
  5. Cristian Peța

    Pointers... loops...

    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.
  6. Cristian Peța

    Parsing Google Search Results redux

  7. Cristian Peța

    Parsing Google Search Results redux

    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
  8. Cristian Peța

    jpg validation

    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.
  9. Cristian Peța

    wtf is TForm.Action for?

    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.
  10. Cristian Peța

    wtf is TForm.Action for?

    "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.
  11. Cristian Peța

    The beauty of class and record helpers

    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...
  12. 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.
  13. Cristian Peța

    LiveBinding at runtime

    Actually LiveBindings replaced the data-aware controls overhead. With a worse one. But... that this was by design... this is something new to me.
  14. Was Task Scheduler not good enough for this?
  15. Cristian Peța

    Memory leak only with IDE debugger

    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
  16. Cristian Peța

    Android in VMWare

    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?
  17. Cristian Peța

    Reverse scrolling TEdt?

    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.
  18. Cristian Peța

    Reverse scrolling TEdt?

    If I understand right, this should do the job: ListBox1.Items.Insert(0, 'New string'); or ListBox1.Items.Add('New string');
  19. 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.
  20. Cristian Peța

    IDE Fix Pack 6.4.3 breaks compilation

    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). "
  21. Cristian Peța

    IDE Fix Pack 6.4.3 breaks compilation

    Maybe disabling patches one by one using IDEFixPack.DisabledPatches. But I don't know where to find a complete patch list.
  22. Cristian Peța

    Disaster planning by archiving GetIt installers

    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.
  23. Cristian Peța

    Refer to Form Control without using the Form unit?

    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;
  24. Cristian Peța

    Cannot login to Quality Central - who to contact?

    Also no captcha:
  25. Cristian Peța

    Bug in Delphi License Manager?

    I see only the order to be different but same items. Do I missed something?