Jump to content

dummzeuch

Members
  • Content Count

    2772
  • Joined

  • Last visited

  • Days Won

    98

Everything posted by dummzeuch

  1. dummzeuch

    GetMemory vs. GetMem

    So the description for GetMemory in the online help is wrong: It does not raise an EOutOfMemory exception.
  2. dummzeuch

    Good design for "file was just saved" message

    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.
  3. dummzeuch

    Good design for "file was just saved" message

    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.
  4. dummzeuch

    converting a C enum to Delphi

    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(++).
  5. dummzeuch

    converting a C enum to Delphi

    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.
  6. dummzeuch

    converting a C enum to Delphi

    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.
  7. dummzeuch

    converting a C enum to Delphi

    No, the ordinal values must be correct. These numbers are passed as parameters to a DLL written in C.
  8. dummzeuch

    converting a C enum to Delphi

    Unfortunately that won't compile: Delphi does not allow duplicate values in these enums.
  9. Even if it's not your intention, it's still considered shouting, because nobody but you knows your intention.
  10. dummzeuch

    Jedi - Git => SVN?

    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.
  11. dummzeuch

    Saving a large project takes soooo Loooonnnnggg..

    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.
  12. dummzeuch

    Directory Search in Grep Search: Follow Shortcut links

    I'm afraid recursive hardlinks word result in an infinite loop right now.
  13. 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.
  14. It could be done by a plugin, see the cnwizards advanced syntax highlighting. It may even already support it, I haven't checked.
  15. dummzeuch

    What's the state of JCL/JVCL?

    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.
  16. dummzeuch

    Saving a large project takes soooo Loooonnnnggg..

    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?
  17. 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/
  18. The code is now in dzlib (see blog post for links).
  19. 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.
  20. 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.
  21. dummzeuch

    P.I. Engineering XKeys keyboards

    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.
  22. dummzeuch

    Mustangpeak UltraExplorer

    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.
  23. dummzeuch

    quality.embarcadero.com down?

    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.
  24. dummzeuch

    quality.embarcadero.com down?

    Worked for me too now. Thanks.
  25. dummzeuch

    P.I. Engineering XKeys keyboards

    Yes, in particular it's the 24 keys variant I am accessing (directly, not via keyboard or mouse emulation): https://xkeys.com/xk24.html
×