-
Content Count
598 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tommi Prami
-
Delphi 11.1 file associations not set
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, quite useless to report only here, need to report to Embarcadero. And link so we can vote. -
Delphi 11.1 "Open Recent" missing
Tommi Prami replied to Michael Collier's topic in Delphi IDE and APIs
Bug report link please, guitar useless to report only here, need to report to Embarcadero. And link so we can vote. -
Hello, I almost always missspell Lenhgt and Widht, can't remember other on top of my head but there are few. This does not matter how slowly I spell it in my head while typing, fingers will do the wrong order π -Tee-
-
More efficient string handling
Tommi Prami replied to parallax's topic in Algorithms, Data Structures and Class Design
Tineas thing of all (in this context), but always pass string parameters as const, if possible, procedure Foo(const AStringValue: string); -Tee- -
Project to create a language definition in BNF format started
Tommi Prami replied to TurboMagic's topic in RTL and Delphi Object Pascal
Read parts of it, but did not shed much light on how we could use it. I'll try to read it later with some though. -Tee- -
Project to create a language definition in BNF format started
Tommi Prami replied to TurboMagic's topic in RTL and Delphi Object Pascal
This BNF was new thing for me. Is there some easily usable "things" we could benefit from that Grammar. Any cool tools that could use that etc. Please educate me and others BNF-challenged persons :) -Tee- -
Frequent and/or annoying typos you make while coding
Tommi Prami replied to Tommi Prami's topic in General Help
Nice info dudes but besides the original question π I am not asking for solutions how to fix or find them, I want to just know what words you have problem of getting right. Please tell me what do you miss spell π -Tee- -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami posted a topic in Delphi IDE and APIs
I've always liked to use search functionality of Object Inspector, but have not figured out how to get into there with keyboard, would think it would be Ctrl+F, but seems not. -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Let's check... Thanks! Never saw the cursor in the search box, maybe had habit to click with mouse etc right away... Cool! -Tee- -
Keyboard shortcut to get into Object Inspector "search Edit"
Tommi Prami replied to Tommi Prami's topic in Delphi IDE and APIs
Always wanted to use that filtering but "can't" because can't figure out how to get in there from keyboard -
True, Maintainer and/or lead developer would be still needed but as it is now, we can't help. -Tee-
-
Quite OK Image (QOI) image format
Tommi Prami replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
IMHO this seems to be image format that could stick. Fast and simple. Not super good compression, but not always that important. Depending on things. There seems to be some kind of Turbo Pascal implementation, which is quite weird. But Pascal port anyways. And what I looked at the GIT repo, people are making highly tuned Assembler code for it also. Let's see what happens. There already seems to be plugins for Windows Explorer and Paint.net, which is pretty cool it self. -Tee- PS did not see the post by Angus just before π Thanks for that!! -
Open Sourcing those plugins would be pretty good choice, depending on things. Might contain lot of closed source code etc which would make it impossible. I think David has other things also, I think some of us might be willing to help π Also having good quality plugins with ritch GUI would be suberb to have as OpenSource, as a stepping stone for others also. Just my 0.02β¬
-
I am bit lost on how I can handle user message and return value to the caller app, which is using SendMessage API. I've got following code UM_STATUS = WM_USER + 333; ... // On form procedure WmPrintPreviewStatus(var Msg: TMessage); message UM_PRINT_PREVIEW_STATUS; // and implementation procedure TMyForm.WmStatus(var Msg: TMessage); var LResult: NativeInt; begin LResult := 1; if Assigned(FStatusObject) then if FStatusObject.Status = statFinished then LResult := 2; Msg.Result := LResult; end; What I am now more than less confused that message structure in MSDN looks pretty different (below) and Will my code work, so that caller can use something like MyResult = SendMessage(HWND, UM_STATUS...) typedef struct tagMSG { HWND hwnd; UINT message; WPARAM wParam; LPARAM lParam; DWORD time; POINT pt; DWORD lPrivate; } MSG, *PMSG, *NPMSG, *LPMSG;
-
Handlin the message and returning value to the caller
Tommi Prami replied to Tommi Prami's topic in Windows API
Thanks man! Some Windows messages in Delphi guru should write detailed blog post. There was examples but could not find any that would explain all the plumbing and returning values. π -
"ctrl+click on override" Feature request (please vote if you care)
Tommi Prami posted a topic in Delphi IDE and APIs
I would really love that crlt+click would behave same as on inherited keyword. so I could also jump to the palace it is overridden from in interface section as from in implementation (if inherited call is there), this would help even more if the implementation doesn't have inherited call. https://quality.embarcadero.com/browse/RSP-34573 -Tee- -
Handlin the message and returning value to the caller
Tommi Prami replied to Tommi Prami's topic in Windows API
We acquire HWND of window first then we try to poll window couple of seconds, when status is set, we close from . This is GUI testing AutoIT script which should poll that particular form. -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami posted a topic in RTL and Delphi Object Pascal
Would be interesting to see all kinds stupid code out there, possibly with some arguments/proof why some code is bad. For sure there are tons of different coding styles, but still. Sometimes you stumble upon something that is "pure genius" or something that hides the problem that like David Copperfield. Or what are just scary, code that has been working for ages in production but should not π I'll post some examples into the reply Hope someone all post their own and biggest WTF of all times π -Tee- PS. Trey to stay civil and nice, there always are differences of opinion and some prefer the mother and other the daughter. If we can get this thread flΓΆying there will be good information for many I am sure. -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
We got hit by date/time string literals in the code. Someone was using different locale and app crashed and burned π -
PNC Financial Services (USA, Delphi)
Tommi Prami replied to Kyle Miller's topic in Job Opportunities / Coder for Hire
404 -
JSON serialization using published properties w/o attributes
Tommi Prami replied to ZoΓ« Peterson's topic in Algorithms, Data Structures and Class Design
What is disadvantage and/or deal breaker not to use Attribute based library? Why it won't work for you? (Just genuinely curious) ? -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
I'd do it some other way, ad begin end and comment in between or something that it is more clear. (Thee was better version by earlier, so skip this π ) -
StrToFloat () all combinations of decimal separator and lang. settings
Tommi Prami replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
That seems to be correct, thousands separators are not accepted, so have to first handle them self. -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
with MainForm, ButtonCancel do ... with MainForm do with ButtonCancel do ... Nested with clauses are pure evil to refactor out. If it is complex code and there are common properties (Like Caption in VCL on above) how to decode which is which. Made feature request of this one way way back. Hope they make refactorer that would cast the first stone, so can manually refactor rest. : https://quality.embarcadero.com/browse/RSP-18953 -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
StrToDate('2021/12/31'); Using StrToDate() etc with Date/Time literal in code, that most likely will fail in other locals than yours, Also the EncodeDate etc routines giving numbers is better IMHO.