-
Content Count
2975 -
Joined
-
Last visited
-
Days Won
106
Everything posted by dummzeuch
-
"Delphi High Performance" eBook free on Packt today.
dummzeuch replied to Steffen Nyeland's topic in Tips / Blogs / Tutorials / Videos
No, it still works when switching to Europe. -
The Online Help says the following about GetMemory: http://docwiki.embarcadero.com/Libraries/en/System.GetMemory What exactly does it mean by "GetMemory is the C++ compatible version of GetMem."? What does GetMemory do that GetMem doesn't? Why and when should I use GetMemory or GetMem? This is the OLH for GetMem: This function is not available in C++. In C++ you can use GetMemory. In case of a typed pointer, you should consider the New and Dispose procedures, which respectively initialize and finalize the memory block accordingly. I can't see any difference. Maybe it's just that one is available for C++ Builder programs, and the other isn't? So for Delphi programs it doesn't matter which to use?
-
So the description for GetMemory in the online help is wrong: It does not raise an EOutOfMemory exception.
-
Good design for "file was just saved" message
dummzeuch replied to Mike Torrettinni's topic in General Help
What does the enter key do? Depending on the usual workflow (does the user usually want to view the report? Or does he want to copy or send it somewhere?) one of the other buttons might be a good option. Another frequently required information for further processing is the full file name, so maybe there should be a fourth button to copy it to the clipboard. -
Good design for "file was just saved" message
dummzeuch replied to Mike Torrettinni's topic in General Help
That depends: A transient message is fine, a persistent one that I have to click to get rid of it, can be annoying. If it provides the additional options you propose, it might be less annoying. But that's a matter of taste. -
Given the following C type definition: /** image pixel layout information*/ typedef enum VmbPixelLayout { VmbPixelLayoutMono, VmbPixelLayoutMonoPacked, VmbPixelLayoutRaw, VmbPixelLayoutRawPacked, VmbPixelLayoutRGB, VmbPixelLayoutBGR, VmbPixelLayoutRGBA, VmbPixelLayoutBGRA, VmbPixelLayoutYUV411, VmbPixelLayoutYUV422, VmbPixelLayoutYUV444, VmbPixelLayoutMonoP, VmbPixelLayoutMonoPl, VmbPixelLayoutRawP, VmbPixelLayoutRawPl, VmbPixelLayoutYYCbYYCr411, VmbPixelLayoutCbYYCrYY411 = VmbPixelLayoutYUV411, VmbPixelLayoutYCbYCr422, VmbPixelLayoutCbYCrY422 = VmbPixelLayoutYUV422, VmbPixelLayoutYCbCr444, VmbPixelLayoutCbYCr444 = VmbPixelLayoutYUV444, VmbPixelLayoutLAST, }VmbPixelLayout; typedef VmbUint32_t VmbPixelLayout_t; Am I right in assuming that the following constants are an equivalent? const VmbPixelLayoutMono = 0; VmbPixelLayoutMonoPacked = 1; VmbPixelLayoutRaw = 2; VmbPixelLayoutRawPacked = 3; VmbPixelLayoutRGB = 4; VmbPixelLayoutBGR = 5; VmbPixelLayoutRGBA = 6; VmbPixelLayoutBGRA = 7; VmbPixelLayoutYUV411 = 8; VmbPixelLayoutYUV422 = 9; VmbPixelLayoutYUV444 = 10; VmbPixelLayoutMonoP = 11; VmbPixelLayoutMonoPl = 12; VmbPixelLayoutRawP = 13; VmbPixelLayoutRawPl = 14; VmbPixelLayoutYYCbYYCr411 = 15; VmbPixelLayoutCbYYCrYY411 = VmbPixelLayoutYUV411; VmbPixelLayoutYCbYCr422 = 9; // is this correct? VmbPixelLayoutCbYCrY422 = VmbPixelLayoutYUV422; VmbPixelLayoutYCbCr444 = =10; // is this correct? VmbPixelLayoutCbYCr444 = VmbPixelLayoutYUV444; I am in particular usure about the ones following those entries with an explicit value assignment, marked with the "// is this correct?" comment above. I think that enums in C work like this: typedef enum bla { zero, // start counting at 0 one, // 1 two, // 2 three, // 3 eins = one, // reset counter to 1 zwei, // 2 drei, // 3 } So, every time a value is explicitly assigned to an enum the current counter is reset. In case that matters: The declaration is from VmbTransformTypes.h, part of the Vimba ImagesTransform library for Microsoft Visual C(++).
-
OK, so my original translation was correct. Thanks everybody. Regarding using Delphi enums: typedef VmbUint32_t VmbPixelLayout_t; is used in the function and struct declarations. Yes, I could also change that too and use {$Z4} or {$MINENUMSIZE 4} to ensure that the enum size is at least 4 byte (but can I be sure that they aren't larger? (ever?)), but I'm not sure it's worth it. For now I'll simply go forward keeping it a Unit32, since I need something working as fast as possible.
-
Embarcadero's documentation says otherwise OK, maybe that changed in later versions. I'm sure I tried that and it didn't compile. But all that is syntactic sugar. I need to know about the values of VmbPixelLayoutYCbYCr422 and VmbPixelLayoutYCbCr444.
-
No, the ordinal values must be correct. These numbers are passed as parameters to a DLL written in C.
-
Unfortunately that won't compile: Delphi does not allow duplicate values in these enums.
-
Show public/published distinction in code-completion popup?
dummzeuch replied to PeterPanettone's topic in Delphi Third-Party
Even if it's not your intention, it's still considered shouting, because nobody but you knows your intention. -
Svn also works fine for Github repositories, as long as you don't try to commit or use externals. Also, pull requests don't work. If I remember correctly, the URL is the same.
-
Saving a large project takes soooo Loooonnnnggg..
dummzeuch replied to Ian Branch's topic in General Help
You might be thinking of my KnownIdePackagesManager Tool for Delphi, but that only handles IDE packages, not component packages. It should be easy to exend it to do that too, though. -
Directory Search in Grep Search: Follow Shortcut links
dummzeuch replied to PeterPanettone's topic in GExperts
I'm afraid recursive hardlinks word result in an infinite loop right now. -
ToDo items should have a separate syntax color in the editor
dummzeuch replied to PeterPanettone's topic in Delphi IDE and APIs
As I said: It's proof that it could be done by a plugin. I didn't say it does it. But you could get the source code and that functionality. -
ToDo items should have a separate syntax color in the editor
dummzeuch replied to PeterPanettone's topic in Delphi IDE and APIs
It could be done by a plugin, see the cnwizards advanced syntax highlighting. It may even already support it, I haven't checked. -
My impression is that there are very few people left from the original Jedi group. I know for sure that I personally stopped contributing when the project moved to Github, but my contributions were merely a few bug fixes, so they don't really count in the big picture.
-
Saving a large project takes soooo Loooonnnnggg..
dummzeuch replied to Ian Branch's topic in General Help
The CPU sitting at 13% probably means that something is using one core at 100%. So I would not subscribe to this view: Have you tried to disable all IDE extensions to check whether it is caused by one of these? -
Code expert for fixing very simple and obvious syntax errors?
dummzeuch replied to PeterPanettone's topic in Delphi IDE and APIs
Just in case anybody is still interested: I have changed the GExperts Convert Strings Editor Expert to allow for prefixes and suffixes for all lines. Example: I want to create a string containing this code: function FindClassForm(const AClassName: string): TForm; var i: Integer; s: string; begin Result := nil; s := 'Some String'; for i := 0 to Screen.FormCount - 1 do if Screen.Forms[i].ClassNameIs(AClassName) then begin Result := Screen.Forms[i]; Break; end; end; Which means: Quote the lines and escape any existing quotes Add a variable assignment as prefix to the first line Add a " " prefix to all lines to indent the whole thing add a " + #13#10" suffix to each line but the last add a ";" suffix to the last line. The result looks like this: s := 'function FindClassForm(const AClassName: string): TForm; ' + #13#10 'var ' + #13#10 ' i: Integer; ' + #13#10 ' s: string; ' + #13#10 'begin ' + #13#10 ' Result := nil; ' + #13#10 ' s := ''Some String''; ' + #13#10 ' for i := 0 to Screen.FormCount - 1 do ' + #13#10 ' if Screen.Forms[i].ClassNameIs(AClassName) then begin ' + #13#10 ' Result := Screen.Forms[i]; ' + #13#10 ' Break; ' + #13#10 ' end; ' + #13#10 'end; '; There is no release for this yet, but you can always get the sources and compile your own dll: https://blog.dummzeuch.de/gexperts-documentation/compiling-gexperts/ -
Blocking the Windows Screen Saver in Delphi
dummzeuch replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
The code is now in dzlib (see blog post for links). -
How do you deal with git conflict annotations added to DFM files
dummzeuch replied to David Schwartz's topic in General Help
It's not only git which uses this kind of annotations. svn and probably many other SCMs do too. So how can it be that somebody commits stuff like this? One option for dealing with this kind of stupidity is setting up a continous build server and slapping everybody who commits stuff that does not compile. But this requires somebody with authority to do the initial slapping. -
Increasing registration count not possible without active maintenance support
dummzeuch replied to Leif Uneus's topic in Delphi IDE and APIs
That's one reason I have switched "my" license to using a license server. No problem with having to increase the registration count any more. I wonder what will happen to my maintenance only version (10.3.1) if the maintenance runs out. Currently I am getting a warning. I theory it should continue to work because I got it while maintenance was active. -
Before I reinvent the wheel: Has anybody used the XKeys PIEHid32.dll from Delphi? The API functions aren't very complicated but there is of course still room for errors when converting the C header files to Delphi. A quick Google search did not turn up anything usefull.
-
By "Google SVN", do you mean Google Code? If yes, it should have been archived. The Vitual Shell Tools for example are here: https://code.google.com/archive/p/mustangpeakvirtualshelltools/source/default/source (and there are multiple forks on GitHub) But I could not find any trace of UltraExplorer there.
-
Can anybody currently log into quality.embarcadero.com ? I'm getting the login form, but login fails. I received a question regarding one of my bug reports but I can't answer without login.