Jump to content

dummzeuch

Members
  • Content Count

    2611
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by dummzeuch

  1. dummzeuch

    winkey Just for knoledge

    The following AutoHotkey script works fine for me in a Delphi 2007 VCL program: <^>!;::Send ö +<^>!;::Send Ö <^>!'::Send ä <^>!@::Send Ä <^>![::Send ü <^>!{::Send Ü <^>!-::Send ß <^>!h::Send 🏠 Homeoffice <^>!p::Send 🍴 Pause <^>!f::Send 😎 Feierabend (The Unicode characters in the last three of course don't.) I also tried a Delphi 11 VCL program. There everything works as expected, including the 3 Unicode strings. So the Send command isn't the problem. Which means it probably is the Windows key you are trying to use as a trigger. Did you try my suggestion:
  2. dummzeuch

    winkey Just for knoledge

    VCL TEdit and TMemo are just wrappers around the Windows Edit Control, so they should work as any other edit control. If they don't, we need so see the code you use for sending the text to these. But maybe it's something else altogether: Maybe your script doesn't get called because these key presses get intercepted by something else? To find out whether that's the case you could add some debug code to your script that eg. plays a sound or shows a dialog.
  3. dummzeuch

    How many people use Delphi?

    Works fine for me with http. With https I get a warning that the certificate is for a different domain. And if I force it, it then goes to that domain?! WTF?
  4. dummzeuch

    What is with this errors on the Welcome Page

    Both are easily available through the file menu, so the welcome page is of very limited use even there. Hm, wasn't there also a "Favourites" panel?
  5. dummzeuch

    How many people use Delphi?

    Delphi is dead. Has been at least since 2003. Back then, everybody said that Visual Basic had killed it. Later it was C# and before that it was Java. Ok, on a more serious note: Looking at the state of third party libraries and components, it looks a lot deader today that in the 1990s, but a bit more alive than 5 years ago. Looking at the number of websites that mention Delphi and the number of questions about it on StackOverflow, it is certainly still declining. On the other hand, a lot of things are happening and have been happening around it lately. Embarcadero seems to be a bit more active improving it. And even here on Delphi Praxis some new people have shown up. But of course, Delphi is dead, compared to any of the main stream programming environments.
  6. I'm currently trying to reverse engineer a tool that consists of a frontend with a really dreadful GUI and a command line program as backend, which is called by that frontend and does the actual work. The idea is to write my own frontend that does some additional preparatory work, then calls the backend and … Read on in the blog post.
  7. But quite difficult to reverse engineer. At least compared to the backend just being started with command line parameters. Actually I'm thinking about also tunneling stdin/out/err with the tool. Stdout is actually used by the backend to pads status information back to the frontend.
  8. dummzeuch

    Stop/Abort Form creation..

    Hm, where did my answer with the code example, that I posted this morning, go? I'm sure I pressed submit before closing the browser ... Edit: OK, seems to be gone. Not sure what happened @programmerdelphi2k In case your answer was addressed to me and wasn't meant as a joke: I didn't mean to accuse you of anything. Your code is totally different from what I posted anyway.
  9. dummzeuch

    Stop/Abort Form creation..

    Exceptions won't work inside the FormCreate method, but if you move that code into the Create constructor you could simply call SysUtils.Abort (or raise any other custom exception). Note though that this will immediately calls the destructor, so make sure that destructor works with a partially initialized instance. I never use FormCreate (or FormDestroy for that matter) but always put the code into the constructor / destructor of a form. This saved me from the OldCreateOrder apocalypse when Delphi 11 removed that field from TCustomForm.
  10. dummzeuch

    AssertErrorProc usage

    Hm, I didn't read that comment when I used AssertErrorProc for tracing process flow. Never had any problem with the following procedure assigned to it: var gblAssertTraceOn: Boolean = False; var Trace: TStringList = nil; procedure DebugAssertLine(const _Message, _Filename: string; _LineNumber: Integer; _ErrorAddr: Pointer); var Line: string; begin if gblAssertTraceOn then begin if not Assigned(Trace) then Trace := TStringList.Create; Line := ChangeFileExt(ExtractFileName(_Filename), '') + ':' + IntToStr(_LineNumber) + ' ' + _Message; Trace.Add(Line); end; end; But on the other hand, these calls were no error conditions but simply Assert(False, 'Some descriptive text'); In the end the content of the Trace list was written to a file. It allowed me to write a trace log with information like filename and line number which is difficult to get otherwise. No idea whether using a local variable and the temporary storage used for string concatenation and all these function calls can actually become a problem. Also the code in question is single threaded. I'd never use this in production code though.
  11. dummzeuch

    Class "abcdef" not found. error??

    You said that error occurs when running the program. The first thing I'd do would be running it in the debugger, so I guess you did that too. Did it tell you where the problem is? Does it happen when reading the dfm from the resources?
  12. dummzeuch

    Class "abcdef" not found. error??

    I remember getting errors like this when adding components to a form and then deleting their name in the object inspector. This worked fine if the form contained other components of the same type which had a name, but failed with that error if it was the only one. That was with Delphi 5 though, so this might not apply to current Delphi versions. Back then we used this trick to reduce the number of fields for labels in the class declaration, because these were fully initialised in the designer and never accessed in the code, so we did not need the field. Edit: Thinking about it, it just occurred to me that the reason might be a missing entry in the uses list. Normally the IDE will add them for you, when you drop a component on a form. This may have failed for whatever reason.
  13. dummzeuch

    Open IDE in DPI Unaware??

    One could also register a different program that simply calls bds.exe with the desired parameter.
  14. dummzeuch

    Open IDE in DPI Unaware??

    Do that. It's lots of fun discovering all the new bugs in the IDE that creep up in that scenario. For bonus points make the 96dpi monitor our main monitor.
  15. dummzeuch

    Making fine adjustments of a component

    Ctrl+Arrow Keys or Shift+Arrow Keys. I forget which moves the control and which resizes it.
  16. dzMdbViewer is a small tool I wrote, when I was stuck without a MS Access installation but needed to have a look into a .MDB file (and later .ACCDB file, if the Access Database Engine 2012 is installed). It can open these files and display a list of queries and tables stored in them as well as the data they contain. The new version doesn’t really add anything new to the tool. I updated the project to Delphi 10.2 ... https://blog.dummzeuch.de/2023/04/01/dzmdbviewer-1-0-4-released/
  17. dummzeuch

    Offline Help updates available from Embarcadero

    I'm not Uwe, but I have Delphi 6, 7 and 2006 to 11 installed on a physical machine in order to allow building GExperts for all those versions in one go. Yes, the length of the path variable can become a problem, but there are ways around this: 1. Don't install to c:\program files but use a shorter name (c:\delphi). 2. Replace the long names with the short names in the path 3. Use additional environment variables (e.g. Delphi6Path, Delphi7Path etc.) and only add those in the path (Rapid Environment Editor is a very useful tool for that) Works fine for me.
  18. dummzeuch

    Background Compilation

    I just discovered that I had turned on "Background Compilation" (in Delphi 11, Tools -> Options -> IDE -> Compiling and Running) and that this was the cause for the Compile progress dialog not having the focus and not being centered on the IDE. Does anybody know how the IDE decides where to place this dialog? On my setup it's placed somewhere near the lower right of the main monitor (the IDE is on a secondary monitor on the left hand side). And if I move it, the IDE does not remember that position.
  19. dummzeuch

    Background Compilation

    Quite possible.
  20. The new GExperts version still supports all Delphi versions back to Delphi 6 (with the notable exception of Delphi 8 ) and even the Delphi 11 version is no longer in Beta state. There are even a few new features: * Fast add mode for the Uses Clause Manager is back. * Uses Clause Manager: Units “System” and “SysInit” and those already in the uses list are marked with strike through font. * New functionality to import the favourites from the Wuppdi Welcome Page * Form Hotkeys expert now allows assigning hotkeys. * For the Edit Path expert one can now select the default platform / configuration to edit * Grep no longer stops when it encounters an error (e.g. a file cannot be found or opened). * A non feature: The Goto Previous/Next Modifications editor experts were removed because they caused more trouble than they were worth. Several of those were contributed by GExperts users. Thanks a lot guys (and one girl). And of course a few bug fixes. Read on in the blog post
  21. dummzeuch

    GExperts 1.3.22 experimental twm 2023-03-25 released

    No, but that should be doable. Submit a feature request.
  22. dummzeuch

    Separate Formatter Issue/Warning..

    Ian and I have tried to track this problem down and at least succeeded in finding where it happens: It's in unit GX_CodeFormatterFormatter, method TCodeFormatterFormatter.doExecute. There is a while loop at the end of that method that is supposed to remove any additional CR/LF at the end of a unit: // remove empty lines from the end FTokenIdx := FTokens.Count - 1; while (FTokenIdx > 0) and TokenAtIs(FTokenIdx, rtLineFeed) do begin FTokens.Extract(FTokenIdx).Free; Dec(FTokenIdx); end; Somehow FTokenIdx (which is an integer field of that object) shows as a large negative number in the debugger, even though, as you can see, it is initialized properly. Then the while loop is entered even though the condition FTokenIdx > 0 is not met. Again that's according to the debugger. After executing that loop for a time it causes an access violation. That access violation is silently swallowed by an exception handler of one of the calling methods (yes, you can blame me for not writing a proper exception handler there) and the formatted code is not inserted into the edit buffer. Turning off optimization for that unit makes the issue disappear which seems to point to the Delphi 11 compiler as being the culprit here. Unfortunately I am not fluent enough with reading assembler code to find out what the actual problem is. And since it only ever happened once on my computer I can't really debug it and writing a bug report without any further info will probably pointless. If anybody with better knowledge in that area wants to step in, I would be grateful. For now, I have completely disabled optimization in Delphi 11 for that unit. That change was committed to revision #4003 and #4004
  23. dummzeuch

    Remove Debug Window

    GExperts does not have a debugger. That dialog is from the "Filter Exception" expert. Just disable it and you will get the simpler exception dialog of the IDE back. But you will still get a dialog when your program raises an exception while you debug it. That's a functionality of the IDE's debugger. The Filter Exceptions expert allows you to specify which exceptions to ignore based on the exception type and the content of the message. And that's either global or specific to a project. It also allows you to ignore all exceptions in the current session.
  24. Unit bla; interface type TServerParams = record Url: string; XCoord: Integer; YCoord: Integer; end; TServerParamsArr = array of TServerParams; const ServerParamsArr: TServerParamsArr = ( (Url: 'https://ows.terrestris.de/osm/service'; // <=== XCoord: 529850; YCoord: 5284850), (Url: 'https://geoportal.koblenz.de/geoserver/OEFFENTLICH/ows'; XCoord: (391000 + 408000) div 2; YCoord: (5571000 + 5586000) div 2) ); Given the code above, why do I get a compile error at the line marked with // <=== ? "E2003 Undeclared identifier: 'Url'" This is with Delphi 10.2, just in case that matters. edit: It compiles if I change TServerParamsArray: type TServerParamsArr = array[0..1] of TServerParams;
  25. dummzeuch

    VCL and VCL styles - bugs and future

    Has anybody ever implemented something like this in a Delphi program? Or did we all just sit there and tell everybody that this is not possible because the VCL is not thread safe? Sometimes it would be really nice to be able to create additional (VCL) controls in a background thread and then somehow pass these on to the main thread to add to a form. I never came around spending any time on this though.
×