Leaderboard
Popular Content
Showing content with the highest reputation on 04/29/20 in Posts
-
Another free one is at https://github.com/ekot1/DelphiSVG/commits/master
-
https://stackoverflow.com/q/19054789/505088
-
Why this code fail?
Remy Lebeau replied to Magno's topic in Algorithms, Data Structures and Class Design
Local variables that are un-managed types are not auto-initialized. Object pointers are managed types only on ARC platforms (iOS and Android). Strings are always managed types, integers are never managed types. Only global variables and class members that are un-managed types get auto-initialized to zeros. -
Folks ... I had to delete a couple of posts that were completely off topic. If you really want to continue your personal dispute - please do this in a personal conversation and not here in public.
-
Making method with default encoding
David Heffernan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
This provides no clarification to me. Now I think I have no idea what you are asking. -
Making method with default encoding
Attila Kovacs replied to Tommi Prami's topic in RTL and Delphi Object Pascal
for TEncoding you can set it nil as default and use your favorite one (as default) if the param is nil -
Making method with default encoding
David Heffernan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
You can't declare an encoding instance to be a default parameter value because it is not a constant, never mind a true constant. Hence the compiler error. So you have to resort to overloaded methods. Declare one method that accepts an encoding parameter. And another that does not. From that second overload call the first passing your chosen default encoding. -
Making method with default encoding
Uwe Raabe replied to Tommi Prami's topic in RTL and Delphi Object Pascal
I guess you have to use overload methods. function Format(const Format: string; const Args: array of const): string; overload; function Format(const Format: string; const Args: array of const; const AFormatSettings: TFormatSettings): string; overload; -
Making method with default encoding
David Heffernan replied to Tommi Prami's topic in RTL and Delphi Object Pascal
Default values need to be true constants. This is not. You are confusing default encoding with default parameter value. -
Our main product is very graphic intensive. The customers design and animate the graphics, in an editor we created, for their operators to use for controlling...anything that can be controlled. I asked a few years ago if SVG was important and was told no. I am going to reopen the question.
-
So... I went full tilt A**hole Admin and removed the noise. 1. Don't assume everything is an insult 2. Don't abuse the report system
-
Hello, I was VERY interested until I read "(no source code)" and "(includes source code repository access)". Not sure what the later means. Never purchase components without source code. My2c. Mark
-
Why this code fail?
Lars Fosdal replied to Magno's topic in Algorithms, Data Structures and Class Design
value of myQuery is undefined at call to createMyQuery. Check your hints and warnings. -
How to disable automatic adding of units to interface-uses
microtronx replied to microtronx's topic in FMX
Thanks Dave, that's the trick! -
How to disable automatic adding of units to interface-uses
Dave Nottage replied to microtronx's topic in FMX
Change the ClassGroup property on the service (data) module to System.Classes.TPersistent before adding any components -
2 related questions: The first one is: I found detailed explanations about TNetHTTPClient and TRestClient (and its gang) but I couldn't find an explanation about the advantage of using 3 REST components instead of one TNetHTTPClient component. I do query a rest service and receive data but I do it using TNetHTTPClient and it seems to work ok (unless I'm missing something) so I was wondering what are the benefits/advantages of using the Rest components instead. The other question is: I set the ConnectionTimeout to 120000 (2 minutes) and the ResponseTimeout to 60000000 (1000 minutes). The server is a servlet written in Java and the session timeout there is 30 minutes. Despite the above, after 30 seconds or so, the connection is terminated and the response is nil as if something broke it in the middle of the work. How can I know if it's a client side or a server side? Am I missing something with the responsetimeout I set? Thanks
-
Delphi 10.2 TNetHTTPClient vs TRestClient
Mike Margerum replied to Amos's topic in Network, Cloud and Web
I too was seeing crashes in my FMX app running on mac when exceptions would occur using the REST components. This was back with XE8 and I ended up just building the app in Swift. -
I always used Indy and ICS. Both are great, but both requires extra DLL (OpenSSL) if you need to use https. Each version might required a different OpenSSL DLL version, so mixing both (indy and ICS) will lead to a bucket of inconsistent smelly stuff. In my latest project I was asked to implement a REST client that must access HTTPS URL. I used TNetHTTPClient very successfully. It is very fast and works https without extra DLL. All I had to do was to assign the proper header and voilá! POST, GET, PUT et al with https support. A single component to the rescue.! I tried the TRestClient component family but they seemed to be over complicated ( I just ruled them out )
-
Delphi 10.2 TNetHTTPClient vs TRestClient
Alberto Miola replied to Amos's topic in Network, Cloud and Web
I have stopped using Firemonkey in July 2018 (in favor of Flutter which is awesome 😉 ) so what I am going to say could be useless (bugs have been fixed, MAYBE) but these are the issues: There is not a clear way to handle errors with REST components (REST client / request / response) because sometimes they "randomly" raise exceptions When you try to run a non-blocking operation on the background there are so many issues that I cannot write an full list. I had asked a question some time ago for example (https://stackoverflow.com/questions/50437782/delphi-rest-async-request-detect-connection-failure) but no answers. Major problems are: cannot catch exceptions in async requests, connection timeout seems to be broken because it does not actually time out and when you set params for POST requests I cannot remember which problem I had (they were not properly passed due to encoding problems; it was not a problem of mine because with C# I was able to do everything flawlessy) If you try to use the 3 components with live bindings and data sets with the examples given online (or directly downloading the source code) you get N errors of M type I was able to do some stuff with TOAuth1Authenticator using workarounds because it did not work under certain circumstances My solution was the following: TIdHTTP. Indy is very reliable and it allowed me to create my REST service without any problem. I used to handle GET and POST requests with TIdHTTP inside a TTask.Run(); and then with some anonymous function I used to handle the async response. I had spent 3 hours on this which is nothing compared to the 2 days I had spent with REST components (trying to figure out what was wrong). This is my experience and, as I have already said, bugs may have been fixed. I am telling you the problems that I found so you can save your time or see if the components now work properly. If no, you can safely remove them from Delphi and a simple solution is TIdHTTP in a worker thread. Again, if it can be useful to you, I used to write by myself the REST connection handler with TIdHTTP and some good design patterns that helped me were the following: Template Method, Singleton and Decorator. There are many more that can be useful to you, check on Google! -
The above URL does not work anymore. Here is the current working URL: https://www.idefixpack.de/blog/2018/12/ddevextensions-and-dfmcheck-released-for-delphi-10-3-rio/