Creating items

Good morning. Are all the ways to create classes, methods, properties, etc., have to be created by using the insert/add in the IDE? There is no way to create these just by typing in the editor?

Sadly, no. You can only write the “inner parts” of “outer parts” defined and hidden as a language in the “navigator”

2 Likes

That’s an insane amount of awkardness

1 Like

That’s part of a legacy started 20 years ago… changing the way it works for some kind of round-tripping coding (RTE, free and complete code reflects on navigator and inspector, navigator and property inspector reflects on code) will add a complexity they can’t afford right now.

Keyboard shortcuts and knowing the secret key words can get you moving pretty quickly. You can change scope, parameters, and return types by typing the definition as the name.

You can drag/drop a class etc into your project, whih may be easier.

Also what do you envisage by “just by typing in the editor”?

I’d guess, knowing other development environments, anything but “move hands to the mouse to do something” counts.

It is nice to just type the object, parameters, etc. I type faster than I click. I had the same issue going from Lotus to Excel years ago.

One learns something new every day. I use the keyboard shortcuts for creating properties and methods all the time, never knew I could define the scope and return type.
Thanks for the tip!

Free coding is better because it’s human readable and GIT friendly.

There are RTE IDEs where you can switch from visual to source and back.

When visual, you drag components, adjust exposed properties, etc. and you can for any reason switch to source and see what you did and make changes here and there and even freely write a function that will be used in 2 places of 2 of your events, and then return to visual.

But maybe it will take a decade to Xojo implement something like that.

What about saving your project in the Text Format and in a Text Editor, creating your Items ?

If this is really what you want to do…

image

It does not work. Xojo is “Save only, please don’t edit it or you may break things”.

And what about XLML ?

PAS is easier, but XML can work.

Note: I am running a m1 MacBook Pro and no license to save to these file format.

In XML, I had to remove data added by >2019 IDEs… and get my Project pure API (revert from some API2…). I also added Properties (tons of Properties), but I never go further.

Please… XML is even worse than “text format” for humans.

The XML is kind of the binary internal blocks translated to textual XML blocks.

Let’s just accept that the current Xojo is not tailored for such thing and use what it has today.