Jump to content

Cristian Peța

Members
  • Content Count

    325
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Cristian Peța

  1. 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;
  2. Cristian Peța

    exit terminates delphi app

    @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.
  3. Cristian Peța

    Inch representation format in TEdit like controls

    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"
  4. Cristian Peța

    Inch representation format in TEdit like controls

    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.
  5. 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?
  6. 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;
  7. Cristian Peța

    Hiding a public property in a descendant class

    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.
  8. Cristian Peța

    Print PDF file in Android\iOS application

    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.
  9. Cristian Peța

    Hiding a public property in a descendant class

    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.
  10. Cristian Peța

    Hiding a public property in a descendant class

    More I read on this subject I understand this is right.
  11. Cristian Peța

    Casting pointer to TBytes

    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,
  12. Cristian Peța

    iOS, Error e8000084

    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
  13. Does this app compiled for 64-bit works? Have you tried to upload only with 64-bit binaries?
  14. Cristian Peța

    Delphi XE Zebra scanner

    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.
  15. Cristian Peța

    Delphi XE Zebra scanner

    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.
  16. Cristian Peța

    git and Delphi tooling?

    We use Fork but you need to test to see what is best for you. Never used Delphi integration.
  17. Cristian Peța

    XCode 12 compile error

    --old news--
  18. Cristian Peța

    Outdated Delphi Roadmap

    Patch is just released. https://blogs.embarcadero.com/delphi-compiler-and-lsp-patch-for-rad-studio-10-4-1/
  19. Cristian Peța

    My custom component becomes NI>

    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.
  20. Cristian Peța

    Using Delphi in Virtual machine for a month

    Splitting is useful if you use for backup something that compares the files and only overwrite those that changed.
  21. Cristian Peța

    git workflow question

    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.
  22. Cristian Peța

    10.4.1 Released today

    Something like this? https://quality.embarcadero.com/browse/RSP-30773
  23. Cristian Peța

    August 2020 GM Blog post

    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.
  24. 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.
  25. Cristian Peța

    TFtpClient: Very low speed on transfer data

    Maybe I am wrong but it is not 2^16=65536?
×