Jump to content

Der schöne Günther

  • Content Count

  • Joined

  • Last visited

  • Days Won


Der schöne Günther last won the day on August 1 2021

Der schöne Günther had the most liked content!

Community Reputation

204 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 10.0 Seattle

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oh, in that case, absolutely. Guess I should watch it.
  2. What did I miss? What I understand is that It is not part of the language, it is just a regular method from the standard library Earlier versions did have an untyped parameter and let you pass in things that were not descendants of TObject If that is all, how can you even have an opinion on that? What is there to talk about? Can somebody get me up to date with just one or two sentences? Many thanks.
  3. Der schöne Günther

    Left side cannot be assigned to

    That they cannot be passed as var or out was more a comparison to simple fields, I should have made that clearer. Meaning: If you don't need getter/setters, I fail to see why you would ever go with properties at all.
  4. Der schöne Günther

    Left side cannot be assigned to

    In my absolutely personal opinion, never bother with properties at all. There is no real use for them. They have a lot of other disadvantages - You can't pass them as var or out parameters, Code completion will not tell you if a property is writeable or not. Many other languages are perfectly fine with no properties at all. I can think of C# properties, but they are capable of so much more. In Delphi, a getter/setter makes it immediately clear if a value can be read or written, makes it obvious that there could be side effects as it's not just a regular variable, and can be stored in a function pointer. Also, you can make the setter protected and only allow yourself and your subclasses or another interface to change the value. None of this is possible with properties. In my opinion, they just get in the way and require even more typing as Delphi is already incredibly verbose.
  5. Der schöne Günther

    Left side cannot be assigned to

    Your variable FBoundsRect is of type TRectF which is a record. Records are passed by value, not by reference. Meaning: When you access TempResult.BoundsRect, you are not acting on the original data, but a copy on it. Yes, in theory, you can access and modify the temporary data, but the compiler does not let you as it makes no sense to do so. The compiler message is unfortunately, once again, not helpful. One solution is storing it in a temporary local variable, and then assigning it back, after you have changed the bounds rect. Another one is getting rid of the the properties altogether as they just add noise and hide the fact that you can just replace the complete record, but not just parts of it, as you desire. program Project1; uses System.SysUtils, System.Types; type TMyObject = class(TObject) strict private var _PropField: TRectF; public property PropField: TRectF read _PropField write _PropField; public var VarField: TRectF; end; var myObject: TMyObject; begin myObject := TMyObject.Create(); myObject.VarField.Left := 12.0; myObject.PropField.Left := 12.0; // E2064 LEft side cannot be assigned to end.
  6. Der schöne Günther

    RDP and RD Web deployment of Delphi VCL apps

    Somehow reminds me of this... Source: xkcd: Troubleshooting Sorry for not being helpful. Sometimes, it really is a mess. Even the IDE itself sometimes manages to display modal windows behind itself and the only thing left for me to do is entirely kill it and start fresh.
  7. Der schöne Günther

    Trouble getting JSON FindValue (JSONPath) to work

    Not that I know. Here is another example System.JSON.Builders.TJSONIterator.Find - RAD Studio API Documentation (embarcadero.com) Maybe I just forgot $., was glad it worked, and then moved on. 🙃
  8. Der schöne Günther

    Trouble getting JSON FindValue (JSONPath) to work

    Take at the look at the documentation again, it has some examples. Get Rid of the $ and the dot. program Project1; uses System.SysUtils, System.JSON; begin var myjson:=TJSONObject.ParseJSONValue('{"name": "Chris","value": 10000}'); var myval:=myjson.FindValue('name'); Assert(myVal.Value() = 'Chris'); end. Or here, with arrays: program Project1; uses System.SysUtils, System.JSON; const json = '{'+ ' "name": "Chris",'+ ' "pets": ['+ ' {'+ ' "name": "Rufus",'+ ' "type": "dog",'+ ' "age": 10'+ ' },'+ ' {'+ ' "name": "Wraabargl",'+ ' "type": "Dinosaur",'+ ' "age": 113'+ ' }'+ ' ]'+ '}'; begin var myjson:=TJSONObject.ParseJSONValue(json); var myval:=myjson.FindValue('pets[1].type'); Assert(myVal.Value() = 'Dinosaur'); readln; end.
  9. Der schöne Günther

    Delphi 11.1 - High DPI

    Without more context, it's impossible to say what is wrong in your case. I was very pleasantly surprised when I updated on of our XE7 applications to 10.4 in order to support High DPI. It took me a few days, but everything seemed logical (I had to make a few small changes where the UI used a hard coded number of pixels) - And in the end, it turned out to be great.
  10. Der schöne Günther

    Newly released book: Delphi Legacy Projects

    Same here. I can hardly see myself buying a textbook on paper ever again. Also, don't forget syncing your position. I really like to read something on my computer, or Kindle, and half a day later, I can continue reading on my phone, exactly where I left off.
  11. Der schöne Günther


    Its homepage has a lot of encoding errors (at least in my language), I don't remember when I last saw pictures of CD ROMs on web pages and the text advertises it to be compatible with Delphi 7 and Delphi 2006. Go figure. Delphi comes with FireDAC memory tables that support SQL. Local SQL (FireDAC) - RAD Studio (embarcadero.com) Delphi 10.2: Using Local SQL with Firedac Memory Tables - Stack Overflow
  12. Der schöne Günther

    Windows 11 Speech Recognition

    The voice recognition capabilities of SAPI are horrible, compared with what other technologies offer today. I'm sure it was fine when it was last updated 15 years ago, but as of today, it fails to even meet the most humble expectations.
  13. Der schöne Günther

    Windows 11 Speech Recognition

    Enable continuous dictation - Windows apps | Microsoft Docs Delphi How To Use Microsoft Speech Recognition API - Stack Overflow
  14. Der schöne Günther

    Newly released book: Delphi Legacy Projects

    Amazon in my country lists it as "Currently not available, unknown when it will be". 😐 Please consider at least some kind of PDF. Kindle, however, would be much appreciated. It's just so incredibly comfortable, and other coding books have this option as well.
  15. Der schöne Günther

    Do you need an ARM64 compiler for Windows?

    I have lost track for how many times Microsoft has tried to push Windows on ARM, advertised something great, but in the end, nothing of importance happened. It's not that I have anything against Windows on ARM, but if I want a good ARM based computer, I'm getting a M1 Mac. So, do I need an Windows/ARM64 compiler for RAD Studio? No. Embarcadero should rather focus on core functionality and the many platforms we already have. We don't need another one.