Jump to content

Attila Kovacs

Members
  • Content Count

    2068
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by Attila Kovacs

  1. ..with a js script. Then, the whole html contains 7 lines. One of them right now is 1 million 173 thousand 457 characters long. Must be a dream for the browser to parse it.
  2. There is no actual problem, I just wanted to contribute to a better user experience 🙂 It's indeed can be a bit slow if I'm loading more than 1 page of activity and there are huge comments in it. With just 3-4 clicks this one html line grows to 2-3MB.
  3. @Luiz Felipe Heemann As @Dany Marmur said, create a custom message and handler: const CM_OPEN_FORM2 = WM_APP + 1337; TForm1 = class(TForm) . private procedure CM_OPEN_FORM2_HANDLER(var Message: TMessage); message CM_OPEN_FORM2; .. procedure TForm1.CM_OPEN_FORM2_HANDLER(var Message: TMessage); begin TForm2.Create(Self).ShowModal; end; procedure TForm1.Panel1DblClick(Sender: TObject); begin Postmessage(Self.Handle, CM_OPEN_FORM2, 0,0); end;
  4. Attila Kovacs

    How to create common CreateForm method?

    I prefer caFree action in onClose so I don't have to deal with references at all and doesn't really care if it's shown modal or not. Of course this means the forms are always (re)-created.
  5. Attila Kovacs

    Abnormal file size..

    Analyze your executable. It could have more debug info, more rtti, more resources, more anything.. different linking options, compiler directives, who knows, we can't see those apps.
  6. Attila Kovacs

    Abnormal file size..

    Why is it important if it's a debug build? Debug information is big, which is linked to the executable.
  7. Attila Kovacs

    Single Instance of Dephi IDE?

    Not that you couldn't write an own launcher.....
  8. Attila Kovacs

    Issues with Fontscaling for HDPI in Delphi Berlin

    Ah, I see. Never encounter problems on parenting a form, but for sure, HDPI is still very buggy so I'm not wondering. Just go with your workaround. 😞
  9. Attila Kovacs

    Issues with Fontscaling for HDPI in Delphi Berlin

    Runtime created forms/frames (without dfm template) are not scaling in Berlin. Fixed somewhere in Tokyo/Rio.
  10. What is the simplest way to make the compiler/linker include a class and its RTTI into the executable when I have no references to the class in the code? ATM I have an "if" with a variable in the expression which always evaluates to false and in the begin-end block a "TxyClass.Create;". I don't really like this solution.
  11. Attila Kovacs

    TFDParam.Size - best practice?

    I would try this: Make the varchar(max) parameter to a type of ftMemo and load it from a stringstream: ss := TStringStream.Create(log); p.LoadFromStream(ss, ftMemo);
  12. Attila Kovacs

    Maintaining For loop(s)

    I would serialize the whole filtering, one by one, always returning with the matches and do the next filter (for loop) on the result. (If not already empty).
  13. Attila Kovacs

    FileExists(xxxxx) in a network?

    @Ian Branch Are you holding some infos back? How is a colon in your UNC path? Linux server? Does samba supports colon in UNC?
  14. Attila Kovacs

    Include unused class and its RTTI in the executable

    @Fritzew Good point, thank you. ClassInfo not, but for example ClassParent does the trick. This one is the simplest for now. And ClassParent() is also very tiny.
  15. Attila Kovacs

    Include unused class and its RTTI in the executable

    I've found {$STRONGLINKTYPES ON} and this: https://code.i-harness.com/en/q/281b33c Still curious if anyone has a different solution.
  16. Paramw := (DPI shl 16) + DPI; Form.Perform(WM_DPICHANGED, Paramw, @NewRect); Calculate the new pos and size for the window into NewRect. I've bound this to ctrl-mousewheel like browsers/excel zoom, with limited DPI possibilities (to still fit the form into the display). Step is 24 DPI. Works fine.
  17. Attila Kovacs

    IDE Fix pack for Rio

    You can still donate.
  18. Attila Kovacs

    Delphi Developers Archive (Experimental)

    @Lars Fosdal I see. It's gonna be a lot of work. One suggestion, maybe you could ignore the "Originally shared by,,," text and cite from the text below if possible. https://delphi-developers-archive.blogspot.com/search?q=originally+shared+by
  19. Attila Kovacs

    Delphi Developers Archive (Experimental)

    @Schokohase Kobra, übernehmen Sie. @Dave Nottage There was no titles on g+ why would he want to have a fake one on the takeout? For what reason? Half of the posts will get a "hi" like title, half of them will repeat the whole text. And it's lot of work for nothing. Tagging would make more sense.
  20. Attila Kovacs

    Delphi Developers Archive (Experimental)

    Looks great. Drop the titles.
  21. Attila Kovacs

    ISAPI in Delphi 10.2,10.3 TranslateURI

    @Dmitry Arefiev Thank you, this was fast, I've also edited to have the correct code here.
  22. Attila Kovacs

    ISAPI in Delphi 10.2,10.3 TranslateURI

    You should wipe your version from the net then it's vulnerable as you are not checking the length of the URI. Looks like somebody went to get a coffee at emba in the middle of the refactoring. The right code should be: function TISAPIRequest.TranslateURI(const URI: string): string; var Size: integer; LBytes: TBytes; begin LBytes := DefaultCharSetEncoding.GetBytes(URI); Size := Length(LBytes); SetLength(LBytes, 1024); LBytes[Min(Size, Length(LBytes) - 1)] := 0; // null terminator Size := Length(LBytes); if ECB.ServerSupportFunction(ECB.ConnID, HSE_REQ_MAP_URL_TO_PATH, LBytes, @Size, nil) then Result := DefaultCharSetEncoding.GetString(LBytes, 0, Size - 1); // Dmitry Arefiev Instead of last "Size" reference there should be "Size - 1" end; Can be easily put into an interposer hack/fake-class.
  23. Attila Kovacs

    ISAPI in Delphi 10.2,10.3 TranslateURI

    Do you have a QP #? What is the problem exactly?
  24. Attila Kovacs

    Google Map Component

    Btw. TomTom announced in September a free map API for mobile development.
×