Jump to content

Leaderboard


Popular Content

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

  1. Fr0sT.Brutal

    TortoiseGit with Delphi 10 Seattle

    Manually 🙂
  2. Rollo62

    IOS IPA File generation error

    Sorry, its probably too late. I had read it as: ... I dont have any issues IOS - Developer/Deployment certificate with Provisioning profile.
  3. PeterBelow

    vcl280.bpl

    The error message looks like the designer tries to read values from a dfm file into a component that has not been created yet. Was this other project created with the same Delphi version? Does it open and compile in Delphi Alexandria? Does the form you are trying to use in the new project use any self-written or 3rd-party components you are not yet using in forms of the new project?
  4. Attila Kovacs

    Install Raize components 6.1.10 in Delphi 10

    Oh yes. Make sure RzComps.inc knows your current Delphi/Compiler version. You have to manually adjust it.
  5. Attila Kovacs

    Install Raize components 6.1.10 in Delphi 10

    make sure there is no precompiled stuff with older delphi version like dcu, dcp etc... (backup the raize dir first)
  6. misc_bb

    Delphi REST with PDF files

    After some trial and error again, was able to figure it out. This integration is with the Datylon API & Delphi REST components which handles a PDF return type. Although free account in Datylon doesn't work with this API integration. If anyone want to implements the API or something similar, the following code can be utilized. You just need to add some error handling. Getauthorization - a function that return the Basic authentication with username and password 64bit encoded, small letter 'a' in 'authorization' is from datylon documentation templateid and datasource - these are datylon parameters that needs be followed based on Datylon documentation JSONStr - this is actually the JSON string that needs to be sent TRY RESTRequest := TRESTRequest.create(nil); RESTRequest.Client := TRESTClient.create(RESTRequest); RESTRequest.SynchronizedEvents := False; RESTRequest.Client.UserAgent := DatylonUserAgent; RESTRequest.Client.FallbackCharsetEncoding := 'raw'; RESTRequest.Client.BaseURL := datylon_BaseURI; RESTRequest.Client.ContentType := 'application/json'; RESTRequest.Client.Params.AddItem('authorization', Getauthorization, TRESTRequestParameterkind.pkHTTPHEADER, [TRESTRequestParameterOption.poDoNotEncode]); RESTRequest.Client.Params.AddItem('x-graph-template-id', templateid, TRESTRequestParameterkind.pkHTTPHEADER, [TRESTRequestParameterOption.poDoNotEncode]); RESTRequest.Client.Params.AddItem('x-graph-datasource-name', datasource, TRESTRequestParameterkind.pkHTTPHEADER, [TRESTRequestParameterOption.poDoNotEncode]); RESTRequest.Body.ClearBody; RestRequest.body.Add(JSONStr, ctAPPLICATION_JSON); // RESTRequest.Resource := 'render'; RESTRequest.Method := rmPOST; RESTRequest.Response := TRESTResponse.Create(RESTRequest); RESTRequest.Accept := 'application/pdf'; RESTRequest.Execute; Codesite.Send('AuthenticationProcess Result: ' + RESTRequest.Response.Content); Result := RESTRequest.Response.RawBytes; finally RESTRequest.Free; end; This code result will return rawbytes which you need to convert to a file. You need the FallbackCharsetEncoding to 'raw' - this I'm not sure but I've read this from here: https://community.embarcadero.com/de/component/easydiscuss/rest-request-error-to-get-pdf-attached-berlin-10-1?Itemid=1 I'm not even sure if it made a difference but I lost track of it which ones is working and which one is not when I was doing my trial and error. 🤣 the ultimate goal is to make it work haha This is for the bytes to file conversion: procedure TfrmMain.SaveBytesToFile(const Data: TBytes; const FileName: string); var Stream: TFileStream; begin Stream := TFileStream.Create(FileName, fmCreate); try if Data <> nil then Stream.WriteBuffer(Data[0], Length(Data)); finally Stream.Free; end; end; //This will call the REST function above RestResultFile := API.PDFProcess(LoadTextFromFile('text1.txt')); //text file here contains the JSON string SaveBytesToFile(RestResultFile, 'test.pdf'); Thank you guys for your ideas. It led me to this solution above. Cheers!
  7. Lars Fosdal

    TortoiseGit with Delphi 10 Seattle

    Kinda hard to do proper multi-branch management from within the Delphi IDE.
  8. Fr0sT.Brutal

    TortoiseGit with Delphi 10 Seattle

    2) and 4) surprised me much. I just call Tortoise's Commit and Log dialogs from IDE via Tools menu in any time and do Git stuff from there
  9. Der schöne Günther

    TortoiseGit with Delphi 10 Seattle

    TortoiseGit is not Git! Quote from the official documentation:
  10. David Heffernan

    TortoiseGit with Delphi 10 Seattle

    Why would you try to put these two together. You use TortoiseGit inside explorer surely.
  11. Attila Kovacs

    Install Raize components 6.1.10 in Delphi 10

    there is a build script in the source dir
  12. Ondrej Kelle

    Format uses clause

    (I apologise if I'm missing the context here.) Automatically and unconditionally sorting units alphabetically doesn't seem to be a good idea. If you have multiple units exposing the same identifier then changing the order of units in the uses clause changes how they are resolved, probably leading to unintended changes to runtime behaviour of your code.
  13. Lars Fosdal

    AdMob in Delphi11

    Dave, you are a goldmine 🙂 There appears to be several must do, should do, could do (or do not's) that would help the fledgling developer to get started in a good way, and I bet those were hard earned learning points? I would love to see you author an article (or a book) on the ins and outs of doing an Android app with Delphi! Thank you for all your contributions, and a Happy New Year to you!
  14. Dave Nottage

    AdMob in Delphi11

    I've just added a new demo: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Advertising to the Playground repo
×