Jump to content

JonRobertson

Members
  • Content Count

    278
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by JonRobertson

  1. JonRobertson

    Delphi Low-code No-code?

    I prefer projects have documentation. But a lack of documentation does not keep me from investigating. Reading the code is the best way to learn what they do. It takes time to learn new things. I find learning to be extremely valuable. If that was directed at me personally, it should not have been. You have no idea how much money I have spent on software or developer's tools since I started learning to program 43 years ago. I don't understand why a person or company that creates a product they believe would be useful to others wouldn't spent a few minutes to inform potential customers the details, including limitations, of a trial version or offer.
  2. JonRobertson

    Delphi Low-code No-code?

    Nope, but I clicked the link out of curiosity. I just love commercial products that offer a trial but give no details about the trial period, expiration, or trial limitations. However, the price sounds very reasonable... if it works
  3. For me as well. Although I planned to wait until the end of April just to see the feedback on 12.1 before I started.
  4. JonRobertson

    Delphi and "Use only memory safe languages"

    GPT and other AI services aren't capable of thinking. They only "know" what has been trained or other resources to use as a reference (ie code online that a human originally wrote). If I wrote some assembly code that I posted online somewhere and GPT used my code as a reference point, any code that GPT generated would blow big time.
  5. JonRobertson

    State of an uninitialised variables..

    If you want a "default" set of options to apply to each project, you can use Option Sets. Here are a couple of links: from-default-project-options-to-rad-studio-option-sets Option Sets Overview
  6. JonRobertson

    State of an uninitialised variables..

    Project Options, Building, Delphi Compiler, Hints and Warnings: Expand "Output warnings" and scroll down to "Variable might not have been initialized". Select the drop down and set it to "Error": Note there are *dozens* of warnings that you can change to errors.
  7. JonRobertson

    State of an uninitialised variables..

    Agreed. I still think the code demonstrated in the report (and the example posted by Der schöne Günther) is unexpected behavior. objectAsString := 'Hello World'; objectAsString := TJson.Format(objectAsJson); WriteLn(objectAsString); // << It is "Hello World{}" (not including linebreaks) I would not expect 150 to be written to the console for this code: function GetAmount: Integer; begin Result := 50; end; begin var i: Integer := 100; i := GetAmount; writeln(i); end. The compiler even hints that the initial value is never used. [dcc32 Hint] H2077 Value assigned to 'i' never used
  8. JonRobertson

    IDE freezing

    When I started using Delphi 11.x, I was frustrated by frequent IDE lockups and exceptions. After talking to Embarcadero, I selectively uninstalled each component library and expert to try and identify if third-party code was causing those issues. The issues that I was experiencing disappeared once I uninstalled the Parnassus debugger and bookmarks experts. Since then, Delphi 11.3 has been extremely stable for me. Jon
  9. JonRobertson

    IDE freezing

    I copy components from the designer to clipboard quite frequently and I do not recall that issue ever occurring. The most recent versions that I have used are 11.2, 11.3, and 12.0 (without Patch 1). I would also check Task Manager to see what else is running in the background. There could be another application that is monitoring the clipboard and interfering with BDS.exe when you try to copy components.
  10. JonRobertson

    Real time desktop colors change like filters

    Colors for the entire desktop, including icons, taskbar, and start menu? Or change only the colors in the desktop wallpaper?
  11. JonRobertson

    State of an uninitialised variables..

    I do believe our "issue" was with a String return value rather than a local variable. It amazes me that after using Delphi for 28 years, there are still things, even basic features, that I haven't learned. Thank you for your post, which led to a search, then to so initialise-string-function-result, and then to this in the docs: For a string, dynamic array, method pointer, or variant result, the effects are the same as if the function result were declared as an additional var parameter following the declared parameters. In other words, the caller passes an additional 32-bit pointer that points to a variable in which to return the function result.
  12. JonRobertson

    Delphi 12.1 is available

    The IDE only opens the file once, regardless of how many tabs are "editing the same unit". Designer and Code Note: Remember, there is only one file (module or file buffer in internal terms), but multiple editor views over that file, so a change you make in one editor is always reflected in every other editor for the same file. A change made in one editor is not ‘copied’ or ‘duplicated’ or anything else: there is only one file and one content for that file, even if you have multiple editors viewing/editing that file. Another way of saying this is that when you edit a file in one editor, that change is in the file itself, not the editor. By definition, that means that change is always present in the other editors also showing the same file.
  13. JonRobertson

    State of an uninitialised variables..

    I do as well. I even initialize strings and arrays. Although I have not seen this occur in years, I had an issue, around 15 years ago, in a Delphi 6 project where a local string variable was not initialized to empty string.
  14. JonRobertson

    Do you need an ARM64 compiler for Windows?

    I do as well. Such as weird UI issues that do not occur in 32-bit but do occur in 64-bit, which I've encountered more than once.
  15. JonRobertson

    Do you need an ARM64 compiler for Windows?

    I still have problems using the "integrated" (sort of) debugger with Win64 projects.
  16. It does not. I just installed R43 in Delphi 11.3.
  17. Downloaded and installed. This is very helpful, even without adding custom visualizers. I looked on sf for a way to add an "issue" and checked the blog. I suppose you want all feedback to be on this post. In Tools Options, after clicking "Add Defaults", I then deleted each of the items that were added. Except the Delete button does nothing when there is a single item in the list.
  18. JonRobertson

    DelphiLint v1.0.0 released!

    For anyone that has DelphiLint installed, I just filed ticket Issue 20 because BDS.exe was racing one logical CPU when the IDE was otherwise idle and no projects were loaded. Once I removed the Delphi Lint package, BDS.exe CPU usage dropped to 0%. Delphi 11.3 (28.0.48361.3236) DelphiLintClient-1.0.1-Alexandria.bpl delphilint-server-1.0.1.jar plugins\DEFAULT-sonar-delphi-1.3.0.jar
  19. JonRobertson

    DelphiLint v1.0.0 released!

    It could be. I followed the instructions and was in a console window when starting the service. I don't remember anything written to the console window that would have indicated the problem was related to that issue. Now that DelphiLint standalone is working, next week I may installing SonarQube again and try to get a "connected" configuration working. I still need to install our certificate in the JVM and verify that DelphiLint is able to download SonarDelphi. My opinion is that naming convention is not a risk factor, which is the benefit of static analysis. Perhaps there is a risk that I am not aware of. I could see the benefit of those rules being available, just turned off by default. Another example is the default name of a "break" in a menu (main menu or popup menu). The default is "N1" for the first break, "N2" for the second, etc. Sonar suggests that I give those menu items a more meaningful name. As an experienced Delphi developer, naming it "miBreak1" is no more meaningful than "N1", because I know what they are and I don't need to reference them in code.
  20. JonRobertson

    DelphiLint v1.0.0 released!

    https://github.com/integrated-application-development/sonar-delphi/issues/211
  21. JonRobertson

    DelphiLint v1.0.0 released!

    I definitely would appreciate customizing rules in standalone mode. I attempted installing SonarQube and going the "connected mode" route. However, I had difficulty getting the SonarQube service started and I am not a Java guy. Some of the rules are more annoying than helpful. I have no idea what "naming conventions" DelphiLint is expecting. One convention seems to be that unit names must be PascalCase. Particularly for legacy projects, there is no benefit. Yes, a consistent naming convention is very helpful. Does anyone care that all of our form units follow formMain.pas rather than FormMain.pas? I almost want to create an issue for the rule "split this 128 characters long line (which is greater than 120 authorized)". Authorized by who, or what? Certainly not by me, my employer, or anything that I've configured in Delphi. Others are personal preferences. "Delphi style guides" may advise against using () when calling a routine without arguments. But I prefer to have them. They do no harm and I think they improve code read-ability. Those are just a couple examples where the ability to customize the rules, even in standalone mode, would be appreciated.
  22. I've never heard of the Delphi IDE "using" an external editor. The integration between the editor and the rest of the IDE (designer, object inspector, tool palette, etc) would likely need a heavy refactor or rewrite. But as @Lars Fosdal mentioned, you can edit Pascal source in any text editor. The project below is a Delphi plug-in that adds a command to the Tools menu to open the current unit in Visual Code. With a little configuration, you could switch between Delphi and Visual Code at will, taking advantage of features in Visual Code such as Copilot. EditInVsCodeDelphiPlugin
  23. JonRobertson

    Editor: name of this vertical line

    The editor right margin. It is configurable: Tools->Options->User Interface->Editor->Display, in "Margin in gutter" section, "Right margin"
  24. JonRobertson

    Taskbar Icon Menu.

    Search for JumpList.TJumpList. Here are a few links to get you started. https://docwiki.embarcadero.com/RADStudio/Athens/en/VCL_Taskbars https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.JumpList.TCustomJumpList.AddTask https://blog.marcocantu.com/blog/2014-september-vcl-xe7-taskbar-jumplist.html https://perevoznyk.wordpress.com/2011/05/25/adding-windows-7-jump-list-to-a-delphi-2010-application/
  25. A project that I inherited has warning "W1047 Unsafe code" enabled. I normally do not enable that warning. There is a scenario that I don't understand, even after some online searches. [dcc32 Warning] W1047 Unsafe code 'String index to var param' From a couple posts that I read, it seems this specific unsafe warning is related to multiple platform support and zero based strings. It occurs in this (totally useless) code segment: function Test(const aStr: String): String; begin SetLength(Result, Length(aStr)); var Count := 0; for var i := 1 to Length(aStr) do begin Inc(Count); Result[Count] := aStr[i]; end; end; on Result[Count] := aStr; The wording of the warning confuses me. There is an index to a string, but not what I consider a 'string index'. Does the [] operator for String receive the index as a var param?
×