* * *

Recent Posts

Pages: [1] 2 3 ... 10
Networking and Web Programming / Re: FPHTTPClient + GitHub = :)
« Last post by Phil on Today at 05:42:48 pm »
Networking and Web Programming / Re: FPHTTPClient + GitHub = :)
« Last post by Trenatos on Today at 05:40:44 pm »
El Capitan - 10.11.5

Bizarre that it works for you but not for me  :/
Networking and Web Programming / Re: [SOLVED] FPHTTPClient + GitHub = :)
« Last post by Phil on Today at 05:36:15 pm »
GetMem, your code gives the same result on Mac as my original code, can't connect to GitHub and a response code of 0.

I did add openssl dylib to the same directory as the executable (Though it's also installed on the system)

That code works fine here with macOS 10.13. What version of macOS is your Mac running?

Note OpenSSL has been deprecated for years on Mac. Mac built-in libraries work fine. See "Useful" source here for ns_url_request.pas unit.

LCL / how to disable directive
« Last post by helio on Today at 05:35:26 pm »
how to disable {$IFNDEF VerboseAnchorSide} ?
General / Re: Help conversion string UTC to Datetime
« Last post by critter on Today at 05:21:01 pm »
Thank you
any string type, when used in lazarus will use the correct encoding for lazarus and when used in delphi it will use the correct encoding for delphi. There is a slight problem when strings are exchanged between lazarus and delphi but that has nothing to do with string type in the components.
You obviously didn't convert too many Delphi projects. The string type (UTF8) in Lazarus is a hazard and a trap. Same goes for older Delphi (ansi) to newer Delphi (unicode16). Be warned and don't fell asleep.
Although it is adverised as running smoothly - and most of the time it does as advertised - ANY routine that does string manipulation needs to be scrutinised.
Portuguese / Desabilitar componentes da palheta
« Last post by arirod on Today at 05:16:37 pm »
opa ...!  preciso "desabilitar" alguns componentes da palheta do lazarus...tipo "standard, Addictional, Common Controls"....sabe como fazer?....sem desisntalar
General / Re: Strange problem
« Last post by howardpc on Today at 05:13:59 pm »
Your app is allocating memory without freeing it, probably repeatedly.
Without a working crystal ball, or inspection of a compilable source that shows the problem, your guesses are likely to be better than ours about the cause of this state of affairs.
Networking and Web Programming / Re: FPHTTPClient + GitHub = :)
« Last post by Trenatos on Today at 05:13:55 pm »
Tested with https://httpbin.org/get and it does return and outputs the json data, but not with GitHub.

WriteLn( HTTPClient.ResponseHeaders.Text ); outputs nothing for GitHub
WriteLn( HTTPClient.ResponseStatusText ); also outputs nothing for GitHub
The package is to connect to a new generation of fiscal printer of my country (Argentina), and it will communicate with JSON, I will use fphttpclient in Lazarus and Indy for Delphi, as was assigned by my boos. We're using only Delphi 10.
And yes, I already have 2 units (with no code yet), but I wish to share the component (say TFiscalPrinter) between Delphi and Lazarus. The specific things for Delphi and FPC are in 2 separate units (communication with fphttpcliend and Indy, say TJSONCommunication). But with same object name, I only add an ifdef to load the correct file.

Then this is relatively simple to handle. For downloading the JSON, use Indy both for Lazarus and Delphi(it works fine, believe me I tested this for years). For string type use unicodestring(same thing in both cases). In some special cases you will need to do a typecast in lazarus, but the typecast will also work in delphi. The only problem is the parsing of the json, which must be ifdef-ed. I would say you can have almost the same code both for Delphi and the Lazarus package(90%).
Pages: [1] 2 3 ... 10


Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus