-
Content Count
2068 -
Joined
-
Last visited
-
Days Won
28
Everything posted by Attila Kovacs
-
Activity feed loads the whole posts, then it truncates them..
Attila Kovacs posted a topic in Community Management
..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. -
Activity feed loads the whole posts, then it truncates them..
Attila Kovacs replied to Attila Kovacs's topic in Community Management
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. -
When I perform the OnDblClick event (Form1) to open Form2, it fires the OnCellClick event of Form2, without having clicked on the form2 grid
Attila Kovacs replied to Luiz Felipe Heemann's topic in VCL
@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; -
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.
-
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.
-
Why is it important if it's a debug build? Debug information is big, which is linked to the executable.
-
Not that you couldn't write an own launcher.....
-
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. 😞
-
Runtime created forms/frames (without dfm template) are not scaling in Berlin. Fixed somewhere in Tokyo/Rio.
-
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.
-
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);
-
Maintaining For loop(s)
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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). -
@Ian Branch Are you holding some infos back? How is a colon in your UNC path? Linux server? Does samba supports colon in UNC?
-
Include unused class and its RTTI in the executable
Attila Kovacs replied to Attila Kovacs's topic in General Help
@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. -
Include unused class and its RTTI in the executable
Attila Kovacs replied to Attila Kovacs's topic in General Help
I've found {$STRONGLINKTYPES ON} and this: https://code.i-harness.com/en/q/281b33c Still curious if anyone has a different solution. -
Proportional scaling of fonts and components when a forms size is changed?
Attila Kovacs replied to Ian Branch's topic in General Help
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.- 5 replies
-
- delphi
- proportional
-
(and 1 more)
Tagged with:
-
You can still donate.
-
Delphi Developers Archive (Experimental)
Attila Kovacs replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@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 -
Delphi Developers Archive (Experimental)
Attila Kovacs replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@Lars Fosdal ouch 😕 -
Delphi Developers Archive (Experimental)
Attila Kovacs replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
@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. -
Delphi Developers Archive (Experimental)
Attila Kovacs replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Looks great. Drop the titles. -
ISAPI in Delphi 10.2,10.3 TranslateURI
Attila Kovacs replied to hsvandrew's topic in Network, Cloud and Web
@Dmitry Arefiev Thank you, this was fast, I've also edited to have the correct code here. -
ISAPI in Delphi 10.2,10.3 TranslateURI
Attila Kovacs replied to hsvandrew's topic in Network, Cloud and Web
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. -
ISAPI in Delphi 10.2,10.3 TranslateURI
Attila Kovacs replied to hsvandrew's topic in Network, Cloud and Web
Do you have a QP #? What is the problem exactly? -
Btw. TomTom announced in September a free map API for mobile development.