-
Content Count
3701 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
As an aside what annoys me about image lists in Delphi is that they lump all images in one big dfm blob. I like to keep my icons in icon files and link them as a resource. Then load them up at runtime. It means that when you need to update one you just change the ico file in one place. But then you don't get to see icons at design time. I'd like to have my icons in resources and see them at design time. Such a system must be possible.
-
Multithreading in Python is inevitably blocked by the GIL. Nothing you can do about it. No magic solution. See countless discussions of this topic on the broader internet. In other words the issue is not related to Delphi or p4d but is a fundamental design choice in Python.
-
Survey of Delphi Versions in use??
David Heffernan replied to Ian Branch's topic in Community Management
This question is the one that drives statisticians around the world completely mad. You need to decide on your goals before deciding what data to collect. -
Record / Class
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
Why return a pointer to self? You just risk having that pointer outlive the record instance. Make this a constructor or a static class function that returns a new instance. BTW I remembered wrongly before. No need for a helper to implement a static class function that returns rTxt. -
Record / Class
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
The final function can't be right. It should be a static class function, but that's not enough. What would it return? A pointer to what instance? You'd need to allocate an instance somewhere. I'd use a helper record to get around the inability to forward declare value types. -
Survey of Delphi Versions in use??
David Heffernan replied to Ian Branch's topic in Community Management
When polling you need a methodology. If you poll the entire population, it's easy. But if you poll just a sample, then you need to choose the sample carefully so that it is representative, and you need to follow up non respondents. There is a lot of science in polling to get meaningful data. A self selecting poll on a site like this will not tell you very much if anything about the overall population. But perhaps you just want to know what active members of this site use. And even if that's what you want, it will be hard to impossible to get accurate data -
How to get json array from string?
David Heffernan replied to amit's topic in Network, Cloud and Web
Quite odd to copy some code from an SO question that is in the wrong language. This code is Java. -
Getting PID of winword.exe based on filename
David Heffernan replied to misc_bb's topic in Windows API
Which means the original idea was doomed. -
Getting PID of winword.exe based on filename
David Heffernan replied to misc_bb's topic in Windows API
Does Word use a separate process for each open document? -
Getting PID of winword.exe based on filename
David Heffernan replied to misc_bb's topic in Windows API
Does Word use a separate process for each open document? -
Did you submit a QP report yet?
-
system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'
David Heffernan replied to alogrep's topic in VCL
You could make a minimal example. The issue is surely with your program. -
system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'
David Heffernan replied to alogrep's topic in VCL
Make that minimal reproduction already -
system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'
David Heffernan replied to alogrep's topic in VCL
A minimal reproduction. The act of making one will likely show you what you did wrong. -
system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'
David Heffernan replied to alogrep's topic in VCL
Show us a minimal reproduction of the issue. Then we can talk. -
Reorganize a class / Set Of ..
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
This is known to be unreliable -
Reorganize a class / Set Of ..
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
type TFoo<T> = class type TSetOfT = set of T; end; The compiler reports this error for me: [dcc32 Error] E2001 Ordinal type required -
https://stackoverflow.com/questions/9360280/how-to-make-a-lib-file-when-have-a-dll-file-and-a-header-file
- 2 replies
-
- dll
- import library
-
(and 1 more)
Tagged with:
-
Reorganize a class / Set Of ..
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
Of course it makes sense. Try declaring set of TObject and see how that works out. You'd need to constrain to an ordinal type with 256 or fewer elements and you can't do that with constraints. Too bad we can't have templates. -
Reorganize a class / Set Of ..
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
Whilst you can't use constraints, you can use generics and RTTI to get some effective code reuse when working with enums and sets. Ideally this could be done truly generically but such is life with Delphi. -
Reorganize a class / Set Of ..
David Heffernan replied to PatV's topic in Algorithms, Data Structures and Class Design
We can't see what the class does. You've just shown the interface. -
is FMX supported RTL (Right to Left) languages?
David Heffernan replied to Y. Ghasemi's topic in FMX
I think the answer is still no. -
I cannot understand what you mean by event in component or instance. In fact I can't make any sense out of this.
-
I can't understand the question at all
-
Legacy (bad) code issues on Delphi 11.1 on 64bit VCL apps related to new ASLR linker flags
David Heffernan replied to Davide Angeli's topic in Delphi IDE and APIs
If you want to fully test your own app this is the way to go, so that you get top down allocation for all the addresses in your program. You won't necessarily find all the issues if you only do the fastmm local allocator. Using OS top down has always worked well for me.