-
Content Count
3622 -
Joined
-
Last visited
-
Days Won
179
Everything posted by David Heffernan
-
64-bit type libraries still not supported by the IDE ?
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
You can locate the library and run the typelib importer on it using the command line tool. The format is the same for 32 and 64 bit. The issue is just that a 32 bit process doesn't see the 64 bit registry. But once you pass the 64 bit com dll to the type lib importer it will be fine. Often you just import the 32 bit version of the COM dll and the same import unit works for both. -
64-bit type libraries still not supported by the IDE ?
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
There are plenty of command line tools for this. -
Relaxed JSON
David Heffernan replied to John Kouraklis's topic in Algorithms, Data Structures and Class Design
I don't think that toml is widely used, although I admire its goals. I also believe that it has some limitations. And I don't think there is a Delphi parser for it. -
August 2019 Roadmap released
David Heffernan replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
I expect that's exactly what happened, many times, but the money people decided otherwise. -
Relaxed JSON
David Heffernan replied to John Kouraklis's topic in Algorithms, Data Structures and Class Design
Yeah, seems pointless. Use YAML if you want more readable files. -
Conceptual - callbacks that are called from background thread
David Heffernan replied to Fr0sT.Brutal's topic in Algorithms, Data Structures and Class Design
Documentation is always an option. Don't rule it out. -
parsing Google search results
David Heffernan replied to David Schwartz's topic in Network, Cloud and Web
Isn't this the wrong approach. Don't you use the REST API? -
How to reliably know if there is data selected in TVirtualStringTree
David Heffernan replied to Mike Torrettinni's topic in VCL
What if the user has clicked without using the mouse? -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
The downside of adding checks is that the code bloat is huge. Imagine a function that accepts three args and just forwards them on to another method. You then have three checks against nil, and a single line to forward the call. That burden adds up. Having this checked statically, or even at runtime like range checking would be a boon. Of course, none of that helps with the much more invidious error of passing a reference to an already destroyed object. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Not something I've ever experienced being a Windows only delphi dev. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Erm, yes. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Every function you write that accepts a reference type, you check that it is assigned on entry to the function? -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Examples aren't much use without understanding the rationale behind them. If exceptions are a PITA you must be doing something wrong. It's error handling without exceptions that is a PITA. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Reasonable at certain interfaces between modules, but not in every single function. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Why even bother writing those checks? An exception will be raised as soon as you attempt to use the nil instances. -
looking for design ideas for an easily editable list
David Heffernan replied to David Schwartz's topic in VCL
I guess it depends on what motivates you. Do you want to optimise for the quality of your program's UX, or is it more important to you that you can create the UX as quickly as possible, irrespective of how well it works? -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
It still says exceptions to me. But you say that you don't want to use exceptions. Can you explain why you don't want to use exceptions? -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
This isn't using exceptions for control flow. It's using exceptions to deal with invalid parameters. If you don't use exceptions, and you show a message dialog to the user then what is code going to do next? How are you going to avoid following the normal execution path. You can exit this function. But what about the caller? And its caller? And its caller? And what about when you run your code through your program's API rather than interactively. Pretty debilitating to show a dialog to an API user. -
handling predicate conditions
David Heffernan replied to David Schwartz's topic in Algorithms, Data Structures and Class Design
Best is to use exceptions of course -
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.