Adding a Computed Property

I’ve just enjoyed the latest Blog article and built the GraphicsPath project. However, I had some difficulty, arising from the fact that adding a Computed Property to an item adds an empty shell. I have generally taken the “lazy way” and added a simple Property, then converted it to a Computed Property. This makes Xojo do all the work, including adding the private property, as well as the Return value in Get and the assignment in Set. I was oblivious to the fact that none of this had been done for me, and couldn’t understand why values were missing, or not being passed.
It was only on reading thru the text a third and fourth time, and noticing the words, “add this single line of code after the existing one:”, that I realized that there was no existing line of code in either the Get method or the Set method. Of course, after I’d worked out what they should (or at least might) be, the project performed perfectly. I don’t know whether I’ll ever find a use for the GraphicsPath in my own projects, but it set me thinking.
If converting a simple Property to a Computed Property generates the private property and the fundamental assign and fetch lines in the Get and Set methods, why doesn’t that, or maybe can’t that, happen when “Computed Property” is selected in the first instance. Has anybody any suggestions?

Knowing how to use Xojo effectively can help speed up your development time. If I were to create a computed property directly, it would be because I don’t want the IDE to automate the storage of the value. For this feature, I feel like having both behaviors is actually a good thing and a productivity increase for all of us.

Thanks, Tim. That makes sense, but it begs the question, Why, in the Blog article, does there seem to be the assumption that those items, i.e. the private property, the Return code and the assignment code, are present. From experience, I know that they’re not included, which is why I choose to convert simple to computed, but it still flummoxed me for a bit.

Probably just an oversight in the blog article that they didnt tell you to add the code earlier or something

one use case of the Computed Property is as example a container control where you could access a textfield value direct
without the need of a extra private property.

The only mistake in the blog is that you first should create 2 normal properties with the given names and then with the contextual menu convert them to computed properties and everything would have worked right away.