Jump to content

baka0815

Members
  • Content Count

    47
  • Joined

  • Last visited

Everything posted by baka0815

  1. It probably wouldn't affect a command like that (much), but we're talking about programming here. And there are new design patterns, language features and so on. A command like "write a poem in current teens language" might not work.
  2. The most important part is, that ChatGPT was trained with data from the past. There is no continuous aggregation of knowledge or something. So all answers, how accurate or fascinating they may be, are based on "old" data.
  3. Regarding IsoStringToDateTime the optimization/checks that ChatGPT introduced are not sufficient: if (d < 1) or (d > DaysInAMonth(y, m)) then raise EConvertError.Create('Invalid day of the month: ' + IntToStr(d)); if (m < 1) or (m > 12) then raise EConvertError.Create('Invalid month of the year: ' + IntToStr(m)); This checks the day using the month (m) which could have an invalid value (the check for valid months comes later). So it didn't take the ordering for the checks into account.
  4. baka0815

    "Always break line between else and if" vs. comments

    I also like begin/end for readability, but that code style gives me the creeps. I would format it the following way (or even use additional begins and ends for the "Beeps"). procedure MyProcedure(a, b: Boolean); begin if a then begin if b then Beep else Beep; end else begin // Kommentar if b then Beep else Beep; end; end;
  5. baka0815

    "Always break line between else and if" vs. comments

    I think this could be the same topic as
  6. baka0815

    Can anybody confirm, pls

    Is the problem in the following Procedure? procedure TGotoModificationBaseExpert.InstallPopupHook(_pm: TPopupMenu); I think it's calling itself somewhere down the line of popup hooks and that causes the stack overflow because it's recursively called. Edit: Yes, it seems to be the popup hook.
  7. baka0815

    Can anybody confirm, pls

    I can confirm that deactivating both experts the error goes away. If I then reactivate either of them the error returns.
  8. baka0815

    Can anybody confirm, pls

    Doing this with the latest GExperts release (1..3.21#3833 with Delphi 11.2) I'm getting the following message, but Delphi "survives" this:
  9. We're styling the uses section the following way: uses Windows , SysUtils , Classes , Graphics , Forms ; break after uses break after each unit (but before the comma) only indent the lines not starting with a comma ("Windows" in this example) break before the semi-colon I created a patch and added it to the corresponding ticket: https://sourceforge.net/p/gexperts/feature-requests/154/ It adds two new options to the formatter (line-break page): 'After "uses"' and 'Before the comma'. The latter as a sub-option for 'Between every unit in "uses"' (like 'Except single lines'). 'After "uses"' just adds a break after "uses", to start the "uses"-block. "Before the comma" adds the line feed before the comma in the uses section instead of after it. I also removed the fixme regarding NoIndentUsesComma and FeedEachUnit as it (currently) does exactly what I intended when I submitted the NoIndentUsesComma-patch some time ago. I would like to see this patch merged or at least have some comments if there is something wrong/not as intended.
  10. baka0815

    [Patch] Formatter: more options for uses

    I create a new "Feature Request" with a new unittest unit: https://sourceforge.net/p/gexperts/feature-requests/163/ If you have any comments feel free to get back at me.
  11. baka0815

    Error building rev 3943

    This bug seems to be introduces with revision 3938. That introduced the unit GX_FormHotkeysSelect to GX_FormHotkeys, but the GX_FormHotkeysSelect unit is not found in the source code. Looks like @dummzeuch forgot to add it to the repository. The commit to add the form should have been 3940 ("added additional form for selecting a hotkey") but that changed only the project files. Reverting 3938 and 3940 fixes the compilation for me.
  12. I would also prefer a setting: 1. No space 2. Space 3. Line break 4. leave untouched I personally would prefer the "1 space" variant, but I would also not want to have a comment on the left of a statement. I would prefer the comment above or on the right.
  13. baka0815

    wuppdi import

    See my comment above. I used "AddObject": FavNode := tvFolders.Items.AddObject(tvFolders.Items.GetFirstNode, FavSubfolder, BaseFolder); but it should be "AddChildObject": FavNode := tvFolders.Items.AddChildObject(tvFolders.Items.GetFirstNode, FavSubfolder, BaseFolder); AddObject wants a "sibling" as the first parameter where AddChildObject wants the parent. And we want to use the parent here.
  14. baka0815

    wuppdi import

    Hmm, I need to look into that. I thought I fixed that, as the "WuppdiWP"-subfolder is now below the "Favorites" folder (it was a sibling before). But it looks like I messed something up, as it's still a sibling... Ah, I need to call AddChildObject instead of AddObject - that fixes the issue (btw. restarting Delphi also fixes this as a sibling to Favorites is unsupported). I can change that. How should the fields behave? Should I anchor them left, top and right? I used the "folder properties" dialog as a starting point and there the labels are in front of the edit fields. The same for the file properties. So I would leave it like that. see above This is also the same for folder and file properties. Which property?
  15. baka0815

    wuppdi import

    Ok, I hope I addressed all issues. I created a new form to select the WuppdiWP configuration file as well as a subfolder. The default is "WuppdiWP" and an empty subfolder means "overwrite existing favorites". The user get's an appropriate message. Otherwise the new subfolder is created and the the configuration file is read into that. I didn't touch any of the project files as I only have Delphi 11 and I didn't want to break any existing project files and was unsure adding the new unit with a text editor or similar. I can still do that if you want. But it was enough of a hassle to create the new form completely in Notepad++ to not include some Delphi 11 specialities. FavoriteFiles.patch
  16. baka0815

    wuppdi import

    Thanks for the feedback and sorry for opening the ticket as a "bug" instead of a "feature request"! Unfortunatly I don't have access to D2007 anymore. I only have an installation of 11 Alexandria available. I thought I considered all compatibility-problems and didn't use inline variables this time. 😉 The only scoped enum I used is "TMsgDlgType.mtWarning" right? Or did I miss another instance? I oversaw that and my version uses an action now as well. I would need two hints here: How should I open the file open dialog? There are only two overloads of ShowOpenDialog in GX_GenericUtils and both don't allow a directory as a parameter. Should I directly use a TOpenDialog dialog? Should I create an overload for ShowOpenDialog? How do I get the part of the path specific to the Delphi version? I couldn't find anything in the Embarcadero wiki to get the "19.0" for Delphi 10.2 or the "22.0" for 11.0. I was kinda confused at first when I wrote this import logic, because my settings were not saved. I imported the configuration file and the GUI displayed everything correctly but after a reload of Delphi all those settings were gone. That was the main reason I added the SaveEntries call at the end and the warning at the beginning. If I understand you correctly you would prefer if the import of the configuration file would not clear the root, but add a new subfolder called "wuppdi" (or similar)? As Daniel mentioned in the original wuppdi thread he does not plan to continue working on the wuppdi welcome page plugin, so I don't know if effort is necessary to sync the two files. The GExperts favourites have more options that the wuppdi wp as you can specify the "open mode" (IDE, custom, project, ...) and you can support an unlimited depth of subfolders which is both not supported by the wuppdi wp. It would be a hassle to sync the two files if one adds an entry from one of the two sides. I see this option more as a one-time conversion from wuppdi wp to GExperts favourites. This would surely be possible as an option, but won't work in all cases (especially in my case). I have Delphi 11 which is not supported by the wuppdi wp and so I don't have the configuration file in my BDS\11.0 folder. I would need to copy the old configuration file to the new directory to only use it with GExperts. So that doesn't seem viable to me. See my answers to 5 and 6. Attached is my current version of the patch with 1 and 2 addressed (hopefully). GX_FavFiles.pas.patch
  17. baka0815

    [Patch] Formatter: more options for uses

    I just took a look at the unit tests and there are some tests currently failing. Those are the CurlyHalfCommentEnd, MultilineFunctionDirective1 and MultilineFunctionDirective1 tests, but those are already broken since at least revision 3666 (17.10.2021), so I won't touch them. Normally I would write a test with "FeedEachUnit=0" and another with "FeedEachUnit=1" to test this. There are some settings which could affect other settings and I don't want to create 10 or so configurations or the same amount of "AdjustSettings"-methods. Any help in this regard is appreciated.
  18. Could it be that some Delphi-settings are removed but not set correctly because there are still some GExperts settings? We've automated the process of installing the different components we're using including all the registry settings. If one runs this script before starting Delphi for the first time the IDE is broken because the default settings are not set (because the registry path already exists). Maybe that's a hint in the right direction (or totally unrelated)...
  19. baka0815

    [Patch] Formatter: more options for uses

    Yeah, I'm sorry for using inline variables. They are so convenient and I like them that much, that I'm using them all the time since we upgraded to 10.x. However I don't have Delphi 6 - I could install D2007 fwiw. If I find the time I will create some unit tests for that functionality!
  20. baka0815

    [Patch] Formatter: more options for uses

    Thanks for including the patch! You also asked for unit test on sourceforge - is there a guide or any other kind of help what to check before contributing a patch (like where to add unit tests or how to change the default configurations)? So that I can incorporate that the next time?
  21. baka0815

    [Patch] Formatter: more options for uses

    Thanks Thomas for your time! If you need help looking at the patch or have questions, just ask here or at sourceforge.
  22. baka0815

    GExperts 1.3.12 beta for Delphi 10.3 Rio available

    What I found is that the current OnPopup event in Delphi removes and/or disables the entries in the menu. The same menu is reused for the right click on the editor and breakpoints. My current workaround for this is to hook into the OnPopup event, clear the menu, run the original OnPupup handler and then add myself to the menu. Details here https://sourceforge.net/p/delphitsvnaddin/code/95/log/?path=/trunk (revision 91 and 94).
×