Jump to content

hsvandrew

Members
  • Content Count

    22
  • Joined

  • Last visited

  • Days Won

    2

hsvandrew last won the day on November 30 2021

hsvandrew had the most liked content!

Community Reputation

19 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hsvandrew

    Class Completion

    Thank you @Achim Kalwa I hadn't installed that part of the excellent work by Andreas Hausladen (I use the other critical bits). Still amazes me that these key failures never get actually fixed. Even the alpha sort option doesn't actually work properly.
  2. hsvandrew

    Class Completion

    Is there an option (or plugin) to get class completion to work in a way where all new procedures & functions will appear at the bottom of the unit or in the same order as its declared, rather than in some kind of alpha sorted location? The help topic https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_Class_Completion says "If your declarations and implementations are sorted alphabetically, class completion maintains their sorted order. Otherwise, new routines are placed at the end of the implementation section of the unit, and new declarations are placed in private sections at the beginning of the class declaration." But I don't really know what this means in practice and I can't find any logical settings to control the behaviour... Example: TFoo = class(Tobject) public //Containers procedure Zoo; //Animals procedure Cat; procedure Dog; end; I want the same order to be preserved when creating the implementation.
  3. hsvandrew

    Hot Reload in Delphi?

    In my opinion hot reload is probably the most significant improvement to development since the Delphi IDE made VB look ancient. Developers are very expensive, and there are never enough hours in the day. For some reason developers spend all day making productivity tools for others, but seem to still work with spades instead of bulldozers. I can see this feature being worth at least $5000USD/year/developer which is a game changer. The fact the Delphi community doesn't see how important this is, well, it says a lot.
  4. hsvandrew

    The future of Delphi

    In my view, this is how the future Delphi products should be designed. https://www.canva.com/design/DAEr0Sff_lA/42dTO0oDSOAcvWEN0oDA6g/view?utm_content=DAEr0Sff_lA&utm_campaign=designshare&utm_medium=link&utm_source=sharebutton&fbclid=IwAR0vPdkL1g_ckz9rwLzsLEM2Z-kJrB5WnS_lKHTL37F7QzL5QHAm1XxJqYo#8 I really hope that we could have a discussion about this as a community. Review the presentation. Compliment any good ideas. Ask questions. Question things constructively. Discuss different ways.
  5. hsvandrew

    Linux + Delphi + Apache problem on 10.3

    @Cristian Peța From what I can see ICU is available (IsICUAvailable returns true) As many Delphi developers we have a knowledge base of all the quirks on Windows. I feel this is going to be a learning experience to discover the quirks of Linux. This to me is a dangerous issue that needs to be understood because it could have all sorts of unintended and very hard to track down bugs, especially when the problem disappears as soon as you run it on Windows or Linux console. I suspect the same problem will be affecting many string handling functions and probably other functions as well.
  6. hsvandrew

    How to develop cheaply for iOS?

    You simply need the hosting provider to allow you to VPN to the cloud network running the Mac. However, if you want to make a good iOS app you'll need to do your testing on a real device: you just can't get the 'feel' of an app without touching it. If you want to develop cheaply for iOS you would be using Xcode + HTML + JS or similar. As you've already paid a huge amount of money for Delphi, a Mac should be somewhat affordable.
  7. hsvandrew

    Linux + Delphi + Apache problem on 10.3

    This issue has now been updated to show the offending function. Under the operating environment above, the result of this code is -1 Does anyone know why this might happen? procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); begin response.contentType := 'text/plain'; response.content := 'AnsiCompareText(''PARAMname'',''paramNAME'') ) = ' + inttostr(AnsiCompareText('PARAMname','paramNAME')); end;
  8. hsvandrew

    ISAPI in Delphi 10.2,10.3 TranslateURI

    Apologies @Andrea Magni I wasn't able to edit the survey once it collected results and I wasn't aware of the MARS REST Library
  9. I'm not sure that I agree with this comment. Any memory based storage i.e. SSD, Memory Sticks etc can perform multiple operations at the same time. There is no head to move and multiple parts can be written or changed at the same time. So yes, using a thread would be very helpful. You should create a queue (pool) that receives files to delete, and another process that scans directories. This way you won't need to wait before the directory scan is done to start removing things. You may even want to consider the low level features Everything by Voidtools uses to get the directory structures/file structures faster than FindFirst.
  10. We are having a problem with a devart control which may in the end be something funny they did wrong but the behaviour seems strange and more like a low level issue. Basically, the standard SQL Query control contains a simple SQL statement i.e. thisQuery.SQL.text := 'select * from emp where job = :PARAMname'; thisQuery.ParamByName('paramNAME').asString := 'new'; thisQuery.open; On Windows VCL, console etc and on Linux as a console app this works as expected (param is case insensitive as expected) When the exact same code is compiled into a generic brand new Delphi Apache Module and ran on the exact same machine as the console test app, the query fails unless the param is the same case in the SQL statement as it is in the ParamByName function. This seems strange to me. Does anyone know of any kind of Linux operating system quirk where the host application could override a function in such a way that you might expect this type of behaviour?
  11. hsvandrew

    ISAPI in Delphi 10.2,10.3 TranslateURI

    Returns a blank string, yes logged https://quality.embarcadero.com/browse/RSP-17838
  12. This note is for anyone going about creating an ISAPI in modern versions of Delphi. Request.TranslateURI has been broken (and still remains unfixed in 10.3)for a number of releases. TranslateURI is useful if you run multiple sites on the same IIS server and want to work out the base folder of the site i.e. request.TranslateURI('/') to work out which customer experience/domain etc you are currently serving. I'm not sure if this code covers every unicode etc scenario, but for basic needs it works whereas the built in code does not. You'll need to modify C:\Program Files (x86)\Embarcadero\Studio\20.0\source\internet\Web.Win.IsapiHTTP.pas You need to then ADD the Web.Win.IsapiHTTP.pas to your project with the full source path I'm surprised this bug hasn't had more attention and have to wonder how much web work is going on in Delphi. **please see below for updated version from another member** function TISAPIRequest.TranslateURI(const URI: string): string; var PathBuffer: array[0..1023] of AnsiChar; Size: Integer; begin System.AnsiStrings.StrCopy(PathBuffer, PAnsiChar(AnsiString(URI))); Size := SizeOf(PathBuffer); if ECB.ServerSupportFunction(ECB.ConnID, HSE_REQ_MAP_URL_TO_PATH, @PathBuffer, @Size, nil) then Result := string(PathBuffer) else Result := ''; end;
  13. I'm hoping this post helps future users creating Apache modules for Linux I'm not really sure why, but it was not possible to do anything time consuming in the '.dpr' section of the project for the Apache module. I'm not sure if perhaps apache starts the module up first under root then moves it to the user workers later. In our Windows ISAPI extension we started a startup thread from the DPR before application.run. Under Apache it seems to shutdown the thread started from the main process after a few seconds. We had to move our INIT code into TWebModule1.WebModuleCreate(Sender: TObject); and use a critical section to ensure it wasn't created multiple times. Obviously if anyone knows why, feel free to post. As an example, our startup code connects to a few socket servers to get some startup settings. We could not figure out why the code was getting part way through and just blocking and never receiving the socket response from the working server (after a few seconds/milliseconds) so the first few requests would work then stop. Once the code was moved as above all was fine again.
  14. Hi everyone, Just wondering if anyone has any experience with Delphi 10.2.3/10.3 Apache Modules on Linux request.GetFieldByName('Accept-Language') returns a valid value request.GetFieldByName('HTTPS') is blank, whilst running on a HTTPS connection We aren’t running any load balances and apache IS serving HTTPS content with SNI correctly I’ve even adding to the virtual hosts SetEnv HTTPS on https://serverfault.com/questions/446294/https-variable-in-server-using-nginx-as-reverse-proxy Any ideas? Delphi Rio 10.3 Apache Config <VirtualHost *:443> SetEnv HTTPS on ServerName the.domain.com DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /……(correct file) SSLCertificateKeyFile /…….(correct file) SSLCertificateChainFile /…..(correct file) </VirtualHost>
  15. Hi all, using Delphi 10.2.3 AND Delphi 10.3, the following ISAPI (with no other code, built straight from a new project) crashes the entire ISAPI work queue. I've attached a html test file that causes the crash. It appears like if you have simultaneous ReadTotalContent's running at the same time things lock. Can anyone else reproduce this or suggest why? Please test with IIS 10 or newer. Our test system is Windows Server 2016. TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var fileOut: TFileStream; begin try handled := true; Request.ReadTotalContent;//This freezes everything (ecb.ReadClient) fileOut := TFileStream.Create('C:\temp\files\'+ request.PathInfo.Replace('_upload2/','')+'_'+ request.QueryFields.Values['chunk']+'.txt',fmCreate); fileOut.Write(Request.RawContent,length(Request.RawContent)); FreeAndNil( fileOut ); except end; end; test.html
×