Jump to content

JonRobertson

Members
  • Content Count

    289
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by JonRobertson

  1. JonRobertson

    Delphi and "Use only memory safe languages"

    I have a lot of respect for your knowledge and experience, seeing some of the work you have done. However, I think that is a fairly bold assumption. Since 1996, I have preferred Delphi over other development tools/languages/frameworks. I do not enjoy doing GUI work. But I believe a lot of what "operates the world" is line of business apps, whether they be for commerce, government, health care, or hundreds of other industries. Computers can't read our minds (thankfully). And voice recognition is not that reliable. I see proof of that every time my mother-in-law sends a text.
  2. JonRobertson

    How to edit a config file

    TIniFile will work on any file that conforms to the INI file format, and it seems the RemoteHost.cfg that you have uses the INI file format. But many, if not most, .cfg files will use a different format that isn't compatible with TIniFile.
  3. JonRobertson

    How to edit a config file

    Always pay attention to compiler warnings and hints. Most of the time, the compiler is being helpful. Had you resolved the compiler warning, you would have solved the issue without needing assistance. Asking for assistance isn't a bad thing, that's the beauty of forums like these. But solving issues without assistance is even better, for me anyway. My opinion is that I am not "finished" with code unless it compiles with zero compiler warnings and hints. Sometimes I even add a statement just so the compiler will be "happy". I believe that W1036 should be an error rather than a warning, as using an uninitialized variable is almost always a bug in the code. I only say almost because I've learned there are exceptions to every rule. Warnings can be changed to errors at the project level. I have W1036 set to an error in my projects. This is done in project options. See this post if needed: state of an uninitialized variable try/finally should be a habit when any resource is created or allocated, or a state that should be undone, such as setting Screen.Cursor or calling methods such as DisableControls/EnableControls and BeginUpdate/EndUpdate. Once you've developed the habit, you won't even think about doing it. It'll just be natural. And it'll avoid a lot of potential headache. I neglected to mention it earlier because it was end of day on a Friday and I was ready to leave the office. Oops!
  4. JonRobertson

    How to edit a config file

    You are likely getting an AV because RHini is not initialized to nil. As a local variable, it has a random value until initialized. You should have a compiler warning: [dcc32 Warning] W1036 Variable 'RHini' might not have been initialized Change your top line to: var RHini: TIniFile := nil; or perhaps var RHini: TIniFile := TIniFile.Create(AppDir +'\RemoteHost.cfg');
  5. JonRobertson

    How to edit a config file

    Have you tried using TIniFile and the various Write* methods to write the needed values to the .cfg file? If there are numerous writes, you could use TMemIniFile. System.IniFiles.TIniFile
  6. JonRobertson

    Delphi Low-code No-code?

    I completely agree. Unfortunately, people who write the "corporate check" don't always agree.
  7. JonRobertson

    Delphi Low-code No-code?

    Not at all. I'm sharing what seems to be an opposing opinion. I suppose to clarify any miscommunication, since your ideals about what "I prefer" were opposite of what I actually prefer.
  8. JonRobertson

    Delphi and "Use only memory safe languages"

    Yes, although more of a helper. Removes the with identifier do [and begin/end statements if present] and copies "identifier." to the clipboard so you can easily paste it where needed. It does not automatically determine which fields need the "identifier." added. Very simple example: Before: with Form1 do begin Left := 200; Top := 100; end; Invoke MMX Convert with: After: Left := 200; Top := 100; And "Form1." is in the clipboard to be manually pasted where needed.
  9. JonRobertson

    Delphi and "Use only memory safe languages"

    Hopefully not with Shift-Alt-W (MMX Convert with statement) is a good friend of mine when "migrating" legacy Delphi code.
  10. If you are familiar with other programming languages, I ran across a Cross Reference site that could be useful. It currently cross references 14 languages. Cross Reference Coding
  11. JonRobertson

    Delphi Low-code No-code?

    That is just nonsense in my opinion. Of course the details of a trial are relevant to the trial. Saying otherwise is almost as inconceivable as saying the details of the license agreement are irrelevant to my use of a software product or developer tool. What about the page that quite clearly says at the top Download AppGini Free Trial Or perhaps on the Frequently Asked Questions page, for someone like me that would want to know.
  12. 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.
  13. 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
  14. 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.
  15. 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.
  16. 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
  17. 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.
  18. 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
  19. 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
  20. 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.
  21. 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?
  22. 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.
  23. 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.
  24. 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.
  25. 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.
×