Jump to content

dummzeuch

Members
  • Content Count

    2641
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by dummzeuch

  1. dummzeuch

    wuppdi Welcome Page for Delphi 11 Alexandria?

    It has been included in GExperts now. But to get it for now you will have to compile your own DLL.
  2. dummzeuch

    Ctrl-Alt-F sometimes doesn't

    Of course you could always assign a hotkey that is not yet used anywhere else. Unfortunately hotkeys have become a scarce resource and since the IDE does not provide any function to read which ones are already in use, there is no way to find out for sure. That's why I added the Editor Popup Menu expert which at least for me reduces the need for hotkeys at in GExperts. Unfortunately I also chose Ctrl+H as the default hotkey for that one, which is already taken by the Replace function of the editor. 😞
  3. dummzeuch

    Ctrl-Alt-F sometimes doesn't

    I have always wondered what determines which function of a hotkey gets precedence when there are multiple ones. I found that opening the GExperts configuration dialog and leaving it with OK makes the GExperts hotkeys take precedence for a while but not for the whole session. For editor hotkeys there is also the order of entries in the "Enhancement Modules" list of the Editor Options -> Key Mappings page. Unfortunately the help doesn't really say what effect the order has got, only that they override the hotkeys in the Key Mapping Modules listed on the left.
  4. dummzeuch

    Problems using/building TSynEdit with Alexandria

    Did you compile the runtime package first?
  5. dummzeuch

    How to force update to label during a loop

    I would't subscribe to that. But it definitely shouldn't be used deep inside some library (or even unit) but only in the code inside a form. So if you want to use Application.ProcessMessages from inside such a library, add some call back to the library code which is then assigned some methode in the form which calls Application.ProcessMessages. That way it's a lot less likely to bite you, because (a) you know that it's being called and (b) you can control when. And if you later decide to execute that (library) code in a secondary thread, all you have to change is the code of that callback handler.
  6. dummzeuch

    OldCreateOrder and Delphi 11

    Possibly yes. I solved it by moving all code from OnCreate events to a InitForm method and call that from the constructor (or in some cases move that code directly to the constructor). Fortunately I was never in the habit of using OnCreate at all - I prefer overriding the constructor - so GExperts was the only case where it mattered. Once I found out what the problem was, that wasn't too difficult. What I was after was some code to put into an Expert to fix this annoying behaviour of the IDE.
  7. dummzeuch

    OldCreateOrder and Delphi 11

    Yes, but unfortunately that means that if you open a form in Delphi 11, save it, and open that form in an older version of the IDE (e.g. 10.4), you will end up with a form where OldCreateOrder is True, because that's the default for this property. This can cause all kinds of bugs if you use the OnCreate event. I think that was a totally unnecessary change.
  8. dummzeuch

    wuppdi import

    @baka0815 I would like to discuss the patch for GExperts you put on SourceForge. I think this forum is better suited for that discussion than a bug report on SourceForge. For everybody else: The patch adds a menu item to the GExperts Favorite Files expert to import the favourites from the wuppdi welcome page. It does that by reading the ini file that wuppdi uses to store its configuration. The user has to select that file and after a confirmation the entries are imported and replace the current configuration. You requested feedback, so here we go (I'll start with some problems I found and will offer some suggestions) : Your patch did not compile with Delphi 2007 (and anything older) because scoped enums were introduced at some later time. That was easy to fix by simply removing the scope. After that change it compiled and worked It created a new menu item with an associated event rather than using an action as all the other menu items on that form do. I changed that. The file select dialog does not open to %appdata%\embarcadero\bds but only puts that into the filename edit. After pressing enter that directory was shown. In my opinion it should open to the directory that is used by wuppdi in the version of the IDE it runs on, for Delphi 10.2 that would be "%appdata\emvarcadero\bds\19.0", and it should preselect wuppdiwp.ini Overwriting the existing configuration might be fine for people who have used wuppdi and never used the GExperts Favorite Files expert. Others will probably not want to overwrite their configuration, so I think the import should offer to create a folder "wuppdi" with the new entries. If somebody continues to use wuppdi he probably doesn't want to import these entries every time he changes his favourites. Maybe having an option to automatically replace the GExperst favorites with the ones from wuppdi would be a good idea. Nobody wants to maintain such lists in parallel. Alternatively GExperts could add these favorites on the fly whenever the favorites menu is opened, again replacing the GExperts favorites or adding a folder "wuppdi" to the menu. An export to wuppdi might also be a nice feature, but I don't know when wuppdi reads and writes its .ini file so the data might be overwritten. As always I appreciate any contributions to GExperts.
  9. dummzeuch

    wuppdi import

    committed to revision #3869
  10. dummzeuch

    wuppdi import

    Apart from restarting the IDE, File -> Favorite File Collection -> Open Default Collection also works. Yes, calling AddChildObject fixes the problem. Sorry, I missed that.
  11. dummzeuch

    wuppdi import

    No need to fix the dialog, I already did that. Yes, the other forms work differently and should possibly be changed as well. re 5.: FavoriteFilesForm As for the root folder error: After looking at the code for switching to a different file, I think the easiest fix is to clear the tree view and call CreateFolders. But I'm not yet sure. I don't know this code well enough.
  12. dummzeuch

    wuppdi import

    I like this a lot better but there seems to be one major problem: After importing the Wuppdi entries, it's impossible to delete the created folder. I get the error "You cannot delete the root folder, please select a different folder." I guess that's not too difficult to fix. I'll look into that later. A few things were not quite to my taste with the new dialog: It is not resizable The labels were to the left of the edit fields rather than above (which makes a possible future translation more difficult as that changes the size of the labels - but translation is not going to happen anyway). Due to 1 and 2 the input field for the filename is very small. The dialog opens centered on the monitor rather than the form There was a property and corresponding field for a reference to the Favorite Files dialog which wasn't used anywhere. I fixed these issues and once I fixed the problem with the root folder error message and did some additional tests, I'll commit it to the repository. Thanks again for your contribution.
  13. I've got a generic TdzStreamCache implementation in my dzlib, which adds caching to any type of stream. Not sure whether it is any improvement to TMemoryStream though. I only used TMemoryStream in the unit tests to ensure that no data gets lost, I never timed it against it.
  14. What exactly is the problem you want to solve? Reallocating memory when writing to TMemoryStream?
  15. Pressing Win+Left will dock the current window to the left edge of the current monitor. How can do that from code? I tried to set the form bounds, in particular Left to 0 but that leaves a gap of about 7 pixels. Setting it to -7 still leaves that gap. My Google fu has left me (again). All I can find is how to use the keyboard combination for that.
  16. dummzeuch

    How can I move a window to the left edge of a monitor?

    That doesn't work either. If I subtract if from the top, the title bar gets partly clipped and if I add it to the height, it has no effect.
  17. dummzeuch

    How can I move a window to the left edge of a monitor?

    OK, so Left := -(GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)); works for Left (actually it's Left := Form.Monitor.WorkAreaRect.Left - (GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)); because the left edge of the monitor might not be at pixel 0). It does not work for the height though: Height := Form.Monitor.WorkAreaRect.Height + 2* (GetSystemMetrics(SM_CXSIZEFRAME) + GetSystemMetrics(SM_CXPADDEDBORDER)); still leaves a gap to the bottom border of the monitor. But that's consistent with Windows + Left (but not with maximizing the window)
  18. dummzeuch

    How can I move a window to the left edge of a monitor?

    btw: https://devblogs.microsoft.com/oldnewthing/20150304-00/?p=44543 (I knew I read about this somewhere, just didn't remember were.)
  19. dummzeuch

    How can I move a window to the left edge of a monitor?

    Hm, that seems to be kind of a magical value, because if I use that rather then the -7, it works. It's also -8 on my PC.
  20. dummzeuch

    How can I move a window to the left edge of a monitor?

    This is not about letting the user do anything but the program positioning its window. (To allow the user to do that, the ScreenSnap property is no longer necessary in Windows 10.)
  21. dummzeuch

    wuppdi import

    This patch was missing the changes to the .dfm file. GX_GenericUtils.GetUserApplicationDataFolder can replace the %appdata% environment variable which is what causes the dialog to fail showing the correct directory. As far as I am aware there is no official way to get that number. GExperts declares some constants depending on the VERnnn symbols in GX_VerDepConst. The public documents subdirectory is not one of them, but you could easily add a constant for that. since the required number is already part of the CompilerDefinedProductRegistryKey. Please remember that Wuppdi was only available for some Delphi versions (I don't really known which ones), so that option doesn't make sense for e.g. Delphi 6. Yes. I would implement it this way: Instead of showing the file select dialog show your own dialog. It gives the path of the wuppdi ini file in an edit field (you know the path and filename, so you can check whether it exists and display an error if it doesn't). This edit should allow drag and drop (TWinControl_ActivateDropFiles) and autocompletion (TEdit_SetAutocomplete) and offer a ... button to let the user select the file. A second edit field allows entering the name of a subfolder to import into.
  22. dummzeuch

    check if string date

    Welcome to date format hell. Once you go that way, you will find out that there are many more different date formats than you ever imagined and that many of them are incompatible to each other. My favourite example: US: MM/DD/YY UK: DD/MM/YY If you have the choice always go with an international standard: ISO 8601
  23. dummzeuch

    Disable Event

    Assign NIL to it and later reassign the original event.
  24. dummzeuch

    need help to change the hex in binary file

    Since he already has a hex editor (looks like HxD in the screenshot), setting those bytes to zero would be easy. I don't really see the need for anything Delphi specific there at all
  25. dummzeuch

    wuppdi Welcome Page for Delphi 11 Alexandria?

    As far as I know they can only read from the registry. I'm also not sure when the IDE updates these entries: Whenever they change or only when closing.
×