Jump to content

Cristian Peța

Members
  • Content Count

    330
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Cristian Peța

  1. 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.
  2. Was Task Scheduler not good enough for this?
  3. 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
  4. 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?
  5. 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.
  6. 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');
  7. 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.
  8. 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). "
  9. 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.
  10. 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.
  11. 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;
  12. Cristian Peța

    Cannot login to Quality Central - who to contact?

    Also no captcha:
  13. Cristian Peța

    Bug in Delphi License Manager?

    I see only the order to be different but same items. Do I missed something?
  14. Cristian Peța

    SVG Magic released

    Just realized that RiverSoft SVG Component does have an experimental unit just for this: using TCanvas to build a SVG.
  15. Cristian Peța

    SVG Magic released

    Beside FMX I would like to have a canvas to draw and behind to be generated a SVG. Like Windows Metafile.
  16. 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;
  17. Cristian Peța

    How to get the Currency Symbol in multiple platforms

    Yes. The language selected by the user...
  18. Cristian Peța

    How to get the Currency Symbol in multiple platforms

    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}
  19. You can. But it will be drawn after the control is returned to UI.
  20. Cristian Peța

    10.3.1 has been released

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

    Delphi 5 FOR Loop problem (W10-64bit)

    Is EntryAge and RetireAge floating-point?
  23. Cristian Peța

    (Mis-)Behaviour of TStringHelper

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

    10.3.1 has been released

    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
×