-
Content Count
325 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Cristian Peța
-
I have a project using TidHTTPServer on Delphi 10.3.3 using Indy from Delphi installation. SSL libraries 1.0.2u. All is working. I moved this project to Delphi 10.4.2 and while on http is still working, on https doesn't work anymore. In Fiddler I have his error: [Fiddler] The connection to 'localhost' failed. System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to localhost (for #377) failed. System.IO.IOException Authentication failed because the remote party has closed the transport stream. And in the browser: ERR_TIMED_OUT Here is the code: var ServerSSLIOHandler: TIdServerIOHandlerSSLOpenSSL; begin ..... RootDir := ExtractFilePath(ParamStr(0)); ServerSSLIOHandler := TIdServerIOHandlerSSLOpenSSL.Create(nil); ServerSSLIOhandler.SSLOptions.RootCertFile := RootDir + 'root.pem'; ServerSSLIOhandler.SSLOptions.CertFile := RootDir + 'cert.pem'; ServerSSLIOhandler.SSLOptions.KeyFile := RootDir + 'key.pem'; ServerSSLIOhandler.SSLOptions.Method := sslvSSLv23; ServerSSLIOhandler.SSLOptions.Mode := sslmServer; ServerSSLIOhandler.OnGetPassword := nil; ServerSSLIOhandler.OnVerifyPeer := OnVerifyPeer; FIdHTTPServer := TIdHTTPServer.Create(nil); FIdHTTPServer.IOHandler := ServerSSLIOHandler; FIdHTTPServer.DefaultPort := 8000; FIdHTTPServer.OnCommandGet := FIdHTTPServerCommandGet; FIdHTTPServer.OnCreatePostStream := FIdHTTPServerCreatePostStream;
-
@zMotoR if you are giving to the user the ability to modify scripts and you are afraid that someone will write an exit(), this looks like a nice method that can be easily applied automatically in the background without the user knowledge.
-
Inch representation format in TEdit like controls
Cristian Peța replied to Cristian Peța's topic in General Help
Now I see there is an TMaskEdit.EditText property. But it looks odd if you have a mask like this "0000 00\/00;0;_" and want to write only "1 1/2" -
Inch representation format in TEdit like controls
Cristian Peța replied to Cristian Peța's topic in General Help
But if you read the Text property you have "12316". How to transform this into a value? And what if the user want to type "12 15/16" or "123 1/4"? And I have my control that do the job but was wondering if there are some other edit controls for this. Maybe it's not so common. -
Hiding a public property in a descendant class
Cristian Peța posted a topic in RTL and Delphi Object Pascal
TMyEdit = class(TCustomEdit) private property Text; end; I try to hide the Text property of TCustomEdit in a descendant class but it doesn't work. Code insight (LSP) in other unit does not see it but the compiler does not complain if I use it. Can I do something to hide the Text property? -
Delphi service in a domain controlled environment
Cristian Peța replied to thomh's topic in Network, Cloud and Web
I think a standard Delphi service would be using TService. http://docwiki.embarcadero.com/RADStudio/Sydney/en/Service_Applications Just create a service project and put this in OnExecute event: procedure TService1.Service1Execute(Sender: TService); begin while not Terminated do ServiceThread.ProcessRequests(True); end; -
Hiding a public property in a descendant class
Cristian Peța replied to Cristian Peța's topic in RTL and Delphi Object Pascal
Interestingly, but not a problem in this case. I replaced an old component with a new one and I wanted to be sure there is not code that will set the Text property directly. I don't force it in such a way so no problem. -
I have not tried but I think that a share should work. Then the user will choose to sent by email, print or something else.
-
Hiding a public property in a descendant class
Cristian Peța replied to Cristian Peța's topic in RTL and Delphi Object Pascal
TMyEdit = class(TCustomEdit) private function GetText: String; public property Text: String read GetText; end; implementation function TMyEdit.GetText: String; begin Result := TCustomEdit(Self).Text; end; It works !!!! Text property is now read-only. Do someone knows some side effects of this? There was somewhere a discussion about hiding properties when you re-declare it but I don't remember. -
Hiding a public property in a descendant class
Cristian Peța replied to Cristian Peța's topic in RTL and Delphi Object Pascal
More I read on this subject I understand this is right. -
Casting pointer to TBytes
Cristian Peța replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
You can not because a dynamic array is not just the data. There is also the length and reference count. But you can pass a pointer and length of that memory, -
iOS 14 is supported only with Delphi 10.4 iOS 13 starting with Delphi 10.3.3 Also "iOS Simulator version 11 or later is currently not supported. You can open Xcode > Preferences > Components , to download and install an earlier version of the iOS Simulator. " http://docwiki.embarcadero.com/PlatformStatus/en/Main_Page
-
"This release is not compliant with the Google Play 64-bit requirement"
Cristian Peța replied to Magno's topic in Cross-platform
Does this app compiled for 64-bit works? Have you tried to upload only with 64-bit binaries? -
For your scenario reading the COM port is a better solution. We have only one form that displays many details related to scanned bar-code. Usually the user will work all the day only with a bar-code scanner. No keyboard, no mouse. And the installation must be as easy as possible. Some want to work on Linux, others on smart TV Box's with Android... so this year we moved this part in browser.
-
A little off-topic but this depends. I prefer the scanner to be a keyboard because every client want to user their scanner and setup is very easy. Just plug the scanner into USB and is working. With VCL I use Form.OnKeyDown with Form.KeyPreview=True. Even in browser I use document.addEventListener("keydown", WAKeyDown). This way if the web app tab in the browser has focus I receive the input from the keyboard. No need to have a edit box in focus. And reading a serial port in Javascript is not so straightforward. But there can be a issue if you want to distinguish between a real keyboard and barcode reader.
-
git and Delphi tooling?
Cristian Peța replied to Lars Fosdal's topic in Project Planning and -Management
We use Fork but you need to test to see what is best for you. Never used Delphi integration. -
--old news--
-
Patch is just released. https://blogs.embarcadero.com/delphi-compiler-and-lsp-patch-for-rad-studio-10-4-1/
-
My custom component becomes NI>
Cristian Peța replied to alogrep's topic in RTL and Delphi Object Pascal
You told as that a component is becoming nil. Nil can be a reference to an instance of a class (namely a variable), not a class itself. If table1 is that component that is becoming nil then put a data breakpoint on table1. More exactly on table1's address (namely @table1). But it is enough to write table1 into the addresses field of "Add Data Breakpoint" dialog. @Remy Lebeau thank you very match for this. I needed a data breakpoint sometimes but I didn't know they actually exists. -
Using Delphi in Virtual machine for a month
Cristian Peța replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Splitting is useful if you use for backup something that compares the files and only overwrite those that changed. -
In this case I think it would be better to have all that folders in one repo. Then a branch would not be disturbed because all is there. You will have to deal with conflicts only at merge.
-
10.4.1 Released today
Cristian Peța replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Something like this? https://quality.embarcadero.com/browse/RSP-30773 -
August 2020 GM Blog post
Cristian Peța replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
If you are not in the first wagon then yes, others ask for you. I just setup a SSH and Git as server on Windows using OpenSSH that comes with Windows 10 but this came only two or three years ago and information is not yet well polished. Git as a server on Windows is also not so frequently used. It was enough the information I found, I did not need to ask for help, but it was harder than I thought. Now I think that doing the same thing on Linux is easier because almost all info is for Linux. Installing Subversion server on Windows was a piece of cake some years ago. -
Delphi 10.3.3/10.4 IDE Editor on VMware speed issue
Cristian Peța replied to c0d3r's topic in Delphi IDE and APIs
Not about Delphi IDE but I just tried to take a snip of the screen with Windows logo key+Shift+S. It is sooo slow in VMware to select that rectangle. -
TFtpClient: Very low speed on transfer data
Cristian Peța replied to Alexey Ischuk's topic in ICS - Internet Component Suite
Maybe I am wrong but it is not 2^16=65536?