Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. I posted the following suggestion on the QP. https://quality.embarcadero.com/browse/RSP-37096 I wish I could leave hints in the code as to how I would want a debugger to visualize a complex type variable. You add specify it as a watch statement, but you can’t really keep an infinite list of watches, hence a way of describing a default inspection view in the source code would be useful. type TEditForm = class(TForm) Edit1: TEdit; //$inspect Edit1.(FEnabled, FName, FCaption, Trim(FText)) Consider the hint if you hover over Edit1 in TEditForm.Validate Imagine if the inspect hint comment after the variable declaration had effect: //$inspect Edit1.(FEnabled, FName, FCaption, Trim(FText)) All the formatting and tricks that can be done in the inspector, should be applicable in the $inspect template. You can still expand the Edit1 to see the fields, although I'd like an "All" option and a scrollable list, and perhaps a highlight for the $inspect featured fields. Likewise, for the watch - it could suggest the $inspect template by default instead of the full list, with a checkbox to include all fields if so desired. Another possibility would be to declare the $inspect template at the type declaration, having every instance of that type show the filtered field list.
  2. Instead of the inline "magic" comment, another option would be to have the definitions in a "hive" - be it flat file, database, registry or whatever.
  3. It is not ideal, I agree - but it is easy to introduce. If it fails, it fails - and you fix the comment, and it works. I like the .NET approach too, but it does add a bit of "ceremony" - but it definitively makes sense for frequently used complex classes.
  4. It was just an example of basic functions that could be applied. That said, some of the ancient APIs we rely on, are fixed length strings that are space padded. The idea was that whatever you can do in the evaluator today, should be possible to apply to the inspect format string.
  5. There is a diagram renderer here: https://www.bottlecaps.de/rr/ui - but it barfs on the first definition.
  6. I can't find a validator that will accept the Object Pascal Grammar.
  7. BTW - Is this file in EBNF format?
  8. @Attila Kovacs I am not sure why you think this would be slower than the current inspection view? Massaging the data for display is not that time consuming, considering you already are in a breakpoint situation - or are you thinking about applying it for a logging breakpoint?
  9. True, which is another reason to support something like this in the debugger.
  10. Lars Fosdal

    Problems with email confirmation

    @AlanScottAgain - Can't rename as there is an existing older AlanScott account already.
  11. Lars Fosdal

    Problems with email confirmation

    @Daniel - any known issues atm?
  12. Lars Fosdal

    Delphi on Windows 11 on MacBook Pro 16 (2021)

    For the M-series ARM CPUs, Windows 11 for ARM is the only viable option. Parallells' seamless Windows on MacOS solution is mindblowing. I am working on integration solutions using IBM App Connect Enterprise these days, so I've not been able to spend so much time with Delphi on the Mac as I'd like to. Our company is moving away from Delphi, and the current app portfolio has gone into care & maintenance mode and will in time be replaced with commercial shelf-ware, so my active Delphi time will be greatly reduced going forward. As for using Delphi under Win4ARM om M1 - compilation is not a problem, but I have not had time to test debugging on iOS/Android at all, so others must peep up about any eventual issues on that. Other than the debuggers of Delphi being in an awful state in general - as long as the VM is set up to reroute the USB connections correctly, I would not expect any issues. I went for Pro + 32Gb + 2TB as I don't expect to need those gfx cores. I'd opt for a 64Gb Pro if there was one, but only Max supports 64Gb. I have to say it is an awesome piece of HW - although - during the winter, I actually miss the heat from the Intel CPU on the Lenovo 😛 I'd opt for even more storage, but Apple are greedy AF.
  13. Lars Fosdal

    Announcement: Magenta Hardware Components

    Fixed that.
  14. Lars Fosdal

    Fill Class Variables from a table row??

    We do that for configuration data - it is basically like a key/value dictionary.
  15. Lars Fosdal

    Forum for Spring4D

    If they react at all.
  16. Lars Fosdal

    simple SFTP-like server for Windows?

    Does HFS support secure connections?
  17. Lars Fosdal

    Fill Class Variables from a table row??

    An instance is a value of a class type that has been constructed with a call to Create. A class var is shared across all instances of the class - and they are accessible directly from the uninstanced type as TCompany.ClassVarName. The drawback is that you can only have one value for all the TCompany instances. If you need to have multiple companies in memory, you need to do a TCompany.Create and load up the instances ordinary fields/props per company.
  18. Lars Fosdal

    Fill Class Variables from a table row??

    Just curious - since the data has to be imported - why bother with class vars instead of using a regular instance with regular fields?
  19. Lars Fosdal

    simple SFTP-like server for Windows?

    https://filezilla-project.org/ aka "The free FTP solution" has both a client and a server. Open source, and pretty good. Configurable connections, including source and target folders. Quick, easy and reliable - and you can set a throttle for the transfer rates if you need to. Edit: One significant drawback - the client is not suitable for command line scripting. If you need to do that, you need to use WinSCP or PowerShell.
  20. I don't mind the compiler throwing hints and warnings - as I always fix them as they appear. I even set some warnings to be errors - since they most likely are severe enough to dictate a no-tolerance policy.
  21. Just a minor detail, based on the wisdom in the Framework Design Guidelines book: I would call the property Enabled, and not Enable. Enabled is a state. Enable is an operator. Also - I would not use FThing - but Thing. If it is publicly accessible as a property, I'd use the prop ref, not the field ref, unless the FThing getter did lazy initialization. If it is not for public use, I'd place it under private or strict private and not use the F prefix. Avoiding prefixes also helps for readability. Thing.Enabled := True; Thing.Execute( 1 ); // or Thing.Enable; Thing.Execute( 1 ); // or - Enable could be a function to set Enabled to true, that returns true if it succeeded. if Thing.Enable then Thing.Execute( 1 );
  22. I wonder why an account was created to post the link, and then the account requested to be deleted?
  23. Lars Fosdal

    did Sherlock left DP?

    Good to see you back, @Sherlock! I hope you are recovering ok.
  24. Other advantages: Properties can be read-only. Since you can opt to have methods for the setter and getter of a property, you also have a place to monitor the activity of the said property - with a breakpoint that simply counts accesses, a method that logs the accesses, or an actual breakpoint Using the get method, a property can allow for lazy instance generation, so that if it is never used, the connected instance is never instantiated Using the set method - the validity of a property value can be decided on assignment, without needing that validation to be spread around on the calling code
  25. Lars Fosdal

    task thread priority?

    As I write this, my laptop runs 523 processes with 7600+ threads on a 12-kernal (6 core) i7. If all those threads were check/sleep/loop based - I'd be at 100%. Instead, most of them are idle, just waiting for something to happen.
×