-
Content Count
2857 -
Joined
-
Last visited
-
Days Won
101
Everything posted by dummzeuch
-
Function with 2 return values ?
dummzeuch replied to Henry Olive's topic in RTL and Delphi Object Pascal
I can declare a method parameter of some interface type and pass any class to it that implements the methods that interface defines, independently of any inheritance. If I use an abstract class as type for that parameter, I can only pass classes that descend from that abstract class. -
Function with 2 return values ?
dummzeuch replied to Henry Olive's topic in RTL and Delphi Object Pascal
No, that's not the same. To use an abstract class, your implementing class must inherit from it. A pure interface does not require that. -
ANN: Better Translation Manager released
dummzeuch replied to Anders Melander's topic in Delphi Third-Party
brc32 (part of Delphi) should be able to do that. There are probably quite a few other tools. On the other hand: Why do you need to do that after the exe has finished building? If your files already exist at that point, why not simply add them using the {$R filename.res} directive in the source code? -
Function with 2 return values ?
dummzeuch replied to Henry Olive's topic in RTL and Delphi Object Pascal
My problem with interfaces and their implementation in a class is that you have to type everything twice (copy, of course). I wish there was some hybrid kind of class that simply adds reference counting on top of normal class functionality. Basically the compiler could autogenerate an interface declaration for the public methods of a class and modify the constructors to return that interface instead of the class. Hm, didn't we have reference counted classes in the ARC compiler? -
ANN: Better Translation Manager released
dummzeuch replied to Anders Melander's topic in Delphi Third-Party
If you happen to use dxgettext, there is the assemble tool for that. But given the topic you're posting under, you probably don't use it. -
Job Offer - 5 Delphi Devs for bit Time Professionals
dummzeuch replied to Daniele Teti's topic in Job Opportunities / Coder for Hire
No, but that's in Europe, so you can't compare salaries easily to US salaries, even if you convert EUR to US$. Looks a bit on the low side to me too though, especially for Rome, but I am not that familiar with salaries and cost of living in Italy either. -
Zepplin ransomeware: made using Delphi
dummzeuch replied to DJof SD's topic in Tips / Blogs / Tutorials / Videos
Which will make it more difficult for us Delphi developers as there will be even more false positives with virus scanners. -
How can I add a option to my design time package to force it to be reloaded every time it is opened by any project?
dummzeuch replied to Al T's topic in Delphi IDE and APIs
And just to be sure: Always close the current project before opening a new one. That should remove the package and then reload it when the new project is opened. -
Of course there are several reasons why one would prefer to use ShowMessage: It's a standard dialog form so the user will recognise it immediately and know how to use it If the user skins his Windows installation, the dialog will automatically be skinned too If the way Windows shows these dialogs changes, your own dialog will automatically change too Changing the standard ShowMessage dialog in any way (different font etc.) will negate these advantages. The same applies to building a custom form. Having said that: I too have created a dialog that replaces ShowMessage. The main reason was that I wanted to center that dialog on the parent form (or at least the main form) rather than the current monitor. (If anybody is interested: It's in w_dzDialog, which is part of my dzlib.)
-
Now close the window and save the desktop again.
-
Actually that might be due to the IDE rereading the desktop when you open a new project. Did you save the desktop after you placed the Grep Result window? (It works fine for me in Delphi 2007, XE2 and 10.2. I don't use Delphi 11.)
-
It would also be nice if you posted feature requests and bug reports to SourceForge.
-
Sounds like a use case for GExperts Grep for the current file. Not quite as convenient as the functionality you describe, but certainly workable.
-
[Suggestion] Add a new "Created Date" column to "To Do List"
dummzeuch replied to Edwin Yip's topic in GExperts
Hm, while I agree in principle that features requests should be posted to the right place, I think you did not realize this is the GExperts sub forum, because SourceForge does not have a voting functionality. (And I totally missed this topic until you and Lars commented on it which kind of enforces your point.) -
There is a limit to how many parameters can be passed in registers (faster) vs. on the stack. But that limit also depends on the parameter type and apart from really time critical code you should simply ignore this possible issue, because other considerations are far more important.
-
If you are using GExperts: The Macro Library expert can display the content of a macro, so you can check what was recorded.
-
A gem from the past (Goto)
dummzeuch replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I usually do the same, with an asm nop end; on that line. Unfortunately that Set next statement feature doesn't always work as expected. Sometimes the stack gets corrupted (at least that's what I think what happens). That's why I had to resort to a different approach here. Also, that feature was introduced with Delphi 2007 (or was it 2006?) so for earlier versions you had to change the Program Counter in the CPU window (Yeah, I know, nobody cares any more about these ancient versions. I'm the only freak who still sometimes uses them.). -
Not that I have actually timed it: We use 7zip with the interface units from the jcl to produce .zip (not .7z) files.
-
Have you tried to open the .pas file when the .dfm file is not there? And vice versa?
-
A gem from the past (Goto)
dummzeuch replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
No, a loop wouldn't have worked there. It's a function that is called multiple (many) times from several places, one of these calls (I didn't even know which one) was creating the result I was interested in. A wrapper function world also have worked, something like: function whatever: SomeType; /// this is the original function function innerwhatever: SomeType; begin // some code that generates the result end; // the wrapper function calls it begin Result := innerwhatever; if Result = ResultIWantToDebug then Result := innerwhatever; // <== put a breakpoint here end; I probably should have mentioned that the function has parameters which I omitted in the example because it didn't matter. -
A gem from the past (Goto)
dummzeuch replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I actually used a goto for debugging today. The reason was that at the end of a function I check the result and for a particular result I want to repeat the code in the function in order to step through it: function whatever: SomeType; label RepeatMe; begin RepeatMe: // some code that generates the result if Result = ResultIWantToDebug then goto RepeatMe; // <== put a breakpoint here // some more code end; -
.dws is Delphi Web Script and probably means that the server is misconfigured because instead of executing the file it delivers if for download.
-
dxgettext has been supporting ressourcestrings ever since I started using it, about 15 years ago. I don't know when that was implemented.
-
TPageControl has two events for changing pages: OnChanging and OnChanged. Use the first to get the old tabsheet and the second to get the the new one.
-
Gnugettext for Delphi (dxgettext) handles (VCL) forms.