-
Content Count
3534 -
Joined
-
Last visited
-
Days Won
175
Posts posted by David Heffernan
-
-
Surely all the widely know unit testing libraries are cross platform.
-
GetSystemMetrics is from Winapi.Windows. Use a find in files search of the rtl/vcl source to find which unit contains specific functions.
-
8 hours ago, Ian Branch said:but none seem to work from the project file for one reason or another
Doesn't seem very plausible that this is the case. And it's tricky for us to dig deeper into "one reason or another".
-
21 hours ago, David Schwartz said:C++ has had inline var declarations forever, that's true; although I disagree with your conclusion, mainly because I never saw them used much that way when I worked with C++. I even tried using them occasionally; I found them quite clunky to use except for relatively long lists of operations on the same base object.
Given that you weren't aware of using, it seems that you may not be fluent and experienced with C++. Are you sure you are best placed to be offering critiques of the language?
Certainly my experience of using local variables in C++ differs greatly from yours. It is incredibly valuable in my experience to declare local variables at the point of use and with a narrow scope.
-
4
-
-
1 hour ago, Ondrej Kelle said:SetWindowsHookEx is one of the ways of 'injecting code' on Windows.
Documentation: " SetWindowsHookEx can be used to inject a DLL into another process."
The example here is of WH_MSGFILTER which I don't think does injection.
-
Inject code into every process
-
27 minutes ago, David Schwartz said:C++ will never have a 'with' statement, although it sorely needs it for just this reason.
C++ already has using
-
What you are trying to do is possible. I guess there is just a mistake somewhere, or some extra detail that we don't know of yet.
-
1
-
-
graphics32 is generally faster than gdi I believe
-
1
-
-
9 minutes ago, Remy Lebeau said:Otherwise, don't use TBitmap in a thread at all, use straight Win32 API calls instead.
Or a pure Pascal library like graphics32
-
1
-
-
I would have imagined that you'd want some coordination, not everybody having their own copies, all different. Also, git in particular, and dvcs in general are very complex. You sure you want to throw that at your users. But hey, what do I know about your needs. Nothing.
If you want to use git then go ahead. For instance with libgit2.
-
1
-
-
Doesn't sound very much like dvcs is what you need. Sounds more like a central database is what you need.
-
3
-
-
Probably you'll need to show an complete program, obviously cut down to minimal form, if you want somebody to dig deeper.
-
Why would you be drawn to Embarcadero C++ tools? If you are going to consider C++ then you have a much wider range of options.
-
3
-
-
8 minutes ago, Remy Lebeau said:But, to be honest, in what use-case is it ever useful to call a virtual class method inside of a static class method in practice?
Lars understands that, I think, and wonders why the compiler doesn't take the same view and issue a warning.
-
3
-
-
1 hour ago, Kas Ob. said:Debugger after all should not be altering the debugged application allocated memory without explicit user interaction.
That's not right. In order to evaluate expressions the debugger needs to execute code in the target process. Which may lead to allocations.
It's a defect that the IDE / debugger leak such objects, but they can't do their job if they can't execute code and perform allocations in the target process.
-
2
-
-
This is a known bug in the IDE / debugger. Nothing you can do about it.
Evaluating certain expressions, often involving strings, seems to be what triggers it.
-
1 hour ago, Clément said:Unfortunately I made a very stupid mistake. During my tests I generated over 1.000.000 posts and of course I was NOT checking the post result. Messages where stacking faster than they would be processed.
This is why you should make a repro. Worth bearing that in mind for the future.
-
Encryption is agnostic of framework. I don't see how you could have a VCL only encryption library. You don't need design time components.
-
1
-
1
-
-
Component vendor is wrong.
-
Timers are for GUIs. MsgWaitForMultipleObjects is one sound way to implement a message pump on a thread that needs to do tasks periodically.
-
1
-
-
35 minutes ago, Clément said:If I don't use timers I will have to depend on messages to flush. So I might end up with a lot of "unflushed" log. I would depend on the client to call a "flush logs", that would be wrong.
No you won't. There are plenty of timer free solutions I would expect. Very hard to give advice without context. And very hard to explain why messages are missing with only a partial extract of code.
Anyway, good luck.
-
A complete repro is probably necessary here. A timer seems needless. Just keep track of the time when you last flushed and do it again once a second has elapsed.
-
You reap what you sow. Don't create multiple variables with the same name.
-
1
-
Unit testing cross platform code
in Cross-platform
Posted
Yeah, I know what cross platform means.
What would be platform specific about a unit testing library?