Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/01/22 in all areas

  1. nglthach

    SpkToolbar for Delphi

    Hi, I have ported SpkToolbar from Lazarus to Delphi. Here is the screenshot: You could download here: https://github.com/nglthach/SpkToolbar4Delphi OT: I'm looking for a remote Delphi developer position, if you would like to hire me, please contact via PM! Thanks!
  2. Vandrovnik

    Deploy without overwriting the DB?

    In Delphi 11, it is in C:\Program Files (x86)\Embarcadero\Studio\22.0\source\rtl\common\System.StartUpCopy.pas in my installation. Help and doc - ehm... Did not find them.
  3. Lars Fosdal

    How to get json array from string?

    Another method to do JSON to Object. unit StructureTestTypes; interface uses REST.Json, System.SysUtils; type TStructure = class(TObject) // '{"RESULT":200, "IDLIST":[1,2,3,4,5]}' private FIDLIST: TArray<Integer>; FRESULT: integer; public constructor Create; virtual; destructor Destroy; override; property RESULT: integer read FRESULT write FRESULT; property IDLIST: TArray<Integer> read FIDLIST write FIDList; end; implementation { TStructure } constructor TStructure.Create; begin SetLength(FIDLIST, 0); end; destructor TStructure.Destroy; begin SetLength(FIDLIST, 0); inherited; end; end. Test Program: program JsonStructureTest; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, REST.Json, StructureTestTypes in 'StructureTestTypes.pas'; var Test: TStructure; begin Test := TJson.JsonToObject<TStructure>('{"RESULT":200, "IDLIST":[1,2,3,4,5]}']); try try Writeln('Result: ', Test.RESULT); Write('IDList:'); for var i in Test.IDLIST do Write(' ', i ); Writeln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally Test.Free; Writeln; Write('Press Enter: '); Readln; end; end.
  4. Remy Lebeau

    Load Binary Image From Access DB and show in TImage

    Hmm, I see you've decided to ask your question elsewhere: Delphi Retrieve JPG From Long binary data - JPEG error #53
  5. Remy Lebeau

    How to change the icon of the active tab in TTabControl?

    I generally prefer to use a local accessor class instead: type TTabControlAccess = class(TTabControl) end; TTabControlAccess(TabControl1).UpdateTabImages;
  6. Anders Melander

    looking for remote Delphi job

    It would probably improve your chances of getting a response if you stated where in the world you're located and didn't post under an alias.
  7. Uwe Raabe

    How to get json array from string?

    Declare a class like this and create an instance with TJson.JsonToObject from REST.Json.pas: type TMyJson = class FResult: Integer; FIdList: TArray<Integer>; end; const cJson = '{"RESULT":200, "IDLIST":[1,2,3,4,5]}'; var myJson: TMyJson; begin myJson := TJson.JsonToObject<TMyJson>(cJson); try for var I := 0 to Length(myJson.FIdList) - 1 do { do something with myJson.FIdList[I] } finally myJson.Free; end; end;
×