-
Content Count
3710 -
Joined
-
Last visited
-
Days Won
185
Everything posted by David Heffernan
-
Playing multiple wave files simultaneously
David Heffernan replied to plastkort's topic in General Help
What is more important to you? A solution that works, and 1mb extra exe file size, or no solution and 1mb smaller exe size? -
Depends on your program's requirements and memory usage patterns. What are you trying to achieve with a change of memory manager?
-
Record constants that are actually constant?
David Heffernan replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
Attributes are fragile by design. The compiler cannot verify that you supplied the appropriate attributes to make your program work correctly. For example, at the outset of this thread you are faced with an attempt to pass a typed constant to an attribute constructor and the compiler objects. Well, remove the entire attribute declaration and now your program will compile. -
Things that every desktop program should do
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
VCL styles anybody? -
Record constants that are actually constant?
David Heffernan replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
Really? I think that new features are poorly documented, but long standing language features are actually well documented. -
Except that it doesn't work. Doesn't handle errors at all. Also, it's fine that you don't want to disturb your code. But if you are going to offer up code as an example, it should be exemplary.
-
Why do you think ShellExecute throws exceptions? It doesn't. If you want proper error handling use ShellExecuteEx, and check the return value. Even ShellExecuteEx would be wrong here though. Use CreateProcess. As for services, why use cmd.exe to run net.exe? Why not run it directly? Of course, the API is the right way to start a service.
-
Why put up with it. Progressively strip code out until the warning disappears. That will lead you to the duplication.
-
Things that every desktop program should do
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I don't buy that argument. Your program needs to be able to adapt to changes in screen resolution. When restoring the form layout you must deal with the screen resolution having changed, roaming or not. User can change resolution, font scaling, changes attached monitors, etc. Having said that, I am sure that an argument could be constructed to justify not having such settings roam. In fact, using that part of the user profile that resides on the filesystem allows you to choose between roaming and local on a per setting basis. That's certainly an advantage over HKCU. -
Things that every desktop program should do
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I understood that HKCU did roam -
Things that every desktop program should do
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I can't make sense of this. You are implying that HKCU always roams? And that roaming is not appropriate for such settings? -
Things that every desktop program should do
David Heffernan replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
%appdata% surely. But why not the registry? -
Refer to Form Control without using the Form unit?
David Heffernan replied to Mike Torrettinni's topic in VCL
Cyclic dependencies are not necessarily bad. Sometimes they are essential. Try writing a linked list without a cyclic dependency. -
Disaster planning by archiving GetIt installers
David Heffernan replied to Tom F's topic in Delphi IDE and APIs
The issue is not what components you use. The issue is the development process. You need to be able to create development environments in a robust way. These environments need to be identical. And you need to be able to build with different versions of your codebase, including different versions of your components. That isn't something that you get with naive package manager use. Yes. That's pretty much the point. -
Best way to check if an internet SMTP server is available?
David Heffernan replied to Ian Branch's topic in General Help
It's very hard to reproduce the exact series of steps which are undertaken when sending an email. And why bother? Since you have to handle the case when it fails for real, why not use that? The best code is the code that doesn't exist. Can't be a defect in code that doesn't exist. -
Best way to check if an internet SMTP server is available?
David Heffernan replied to Ian Branch's topic in General Help
I expect that if you do that you'll have clients complaining that your program refuses to send mail when it would succeed if it tried to do so. -
Best way to check if an internet SMTP server is available?
David Heffernan replied to Ian Branch's topic in General Help
You have to deal with any errors that arise when you try it for real. Why do you feel the need to do more? -
Disaster planning by archiving GetIt installers
David Heffernan replied to Tom F's topic in Delphi IDE and APIs
Exactly this. -
Disaster planning by archiving GetIt installers
David Heffernan replied to Tom F's topic in Delphi IDE and APIs
How easy does it seem right now? -
Disaster planning by archiving GetIt installers
David Heffernan replied to Tom F's topic in Delphi IDE and APIs
Why would any professional programmer be using getit anyway? As I understand it, it is suitable for hobbyists and no more. -
Floating point problems with external dlls
David Heffernan replied to Mark Williams's topic in RTL and Delphi Object Pascal
Doesn't sound likely to me at all. Do you understand why I suggest to mask floating point exceptions when calling into other code? -
Floating point problems with external dlls
David Heffernan replied to Mark Williams's topic in RTL and Delphi Object Pascal
I guess you need to mask floating point exceptions before calling in to the dll. https://stackoverflow.com/q/19187479/505088 -
The Android 64bit deadline warnings have started
David Heffernan replied to Yaron's topic in Cross-platform
Thanks. Actually I think we agree on most things, we just have a disagreement on the mechanics of SO. I don't think that's very important in the grand scheme of things, and I am extremely appreciative and admiring of all the good work you do in the Delphi community. -
The Android 64bit deadline warnings have started
David Heffernan replied to Yaron's topic in Cross-platform
Perhaps this comes down to perception, and the type of work involved, and the other attractions of the company, but personally I hire programmers. If they don't know a specific language when they arrive, we teach them that language. I don't really buy in to the idea that there are Java programmers and C# programmers and Python programmers and so on. In my mind there are just programmers. -
The Android 64bit deadline warnings have started
David Heffernan replied to Yaron's topic in Cross-platform
Sadly, I've not seen much that gives me cause for optimism.