Xojo IDE add-ins Feature Request

It should

It has. It’s 35th now.

I personally would like to see less IDE enhancements in this area and instead improve the version control format. It looks pretty nasty with breaking each object down, tags everywhere, etc. I should be able to write an entire module/class in a single text file with no need for anything Xojo specific. Like XojoScript code. Then I should be able to bring that into the IDE and use it.

Code generation is tough right now because you have to navigate the mess that is Xojo’s code structure despite being flat-file.

I would like us to get everything including more stability in the version control format. I have only just started using the version control format myself and immediately got the windows changing colour problem when I converted from a binary project. I do also see the files changing in ways that I did not expect, but to be honest as I just started using this format I am just happy to have versions that I can revert too and check against even if there is some ‘noise’ in them

There is a feature request for something that would get you there <https://xojo.com/issue/7173> . Good if you add your support to it if you think it is suitable.

If there was a simple source code only format then code generation could be done externally. It looks to me like Xojo mixes the actual source code together with attributes and resources that Xojo needs all in the same file. Other IDEs/languages have achieved this by having separate files usually with the same filename and different extensions. I believe that code generation would be better if it was implemented within the IDE as the generator could get more context from the project such as where to insert the code or code files. If we had IDE extensions and say such an extension was a database viewer then a code generator could be initiated with the context of a whole database or specific tables and then generate code for database access etc. Similarly a code generator could be initiated from the context of a non-existent class in some code and instructed to generate a new (somewhat empty) class that could be completed later. Another example would be to have a code generator that could create skeleton unit tests for a class. There are many possibilities and it could be a big thing for Xojo if it is implemented thoroughly, if however it is a ‘hack’ like a bit of Xojo Script fired off from a menu option then it will be better than nothing but not such a great feature as it could be.

In my last project I was using data from a number of excel tables. Instead of doing an import each time I created classes to represent the tables. It was mostly just a Select Case situation using events and some helper code and properties. Long story short I made a helper app that generated the code for each class. I was able to just paste the data and boom, a class appeared.

I did it by creating a single class with the structure I wanted then saving it in the version control format. Then used that as my template. When I imported automatically generated classes into the IDE it added a bunch of other stuff (“it” being the IDE). Seemed to work, so I forged ahead. App works fine.

tl;dr You can write code outside of the IDE. YMMV

I believe that Xojo is not very well prepared right now for introduction of wrong content from the outside world. I don’t know what’s the current result of some mistyped words being imported right now, maybe things could look ok and then crash all the system few hours later? Being a planned feature seems still a need.

I wish to switch parts to a “free mode” and write things like:

Class myClass inherits Canvas
End Class

And see the myClass show up magically on the Navigator. If I click myClass on theNavigator I see it’s properties on the inspector. If I change something and then I come back to the code mode, I see the code changes (round-trip coding). If I drag the object to a window and then return the “free mode” and change some visual property of myClass I can see that change when returning from free to visual mode (with no errors, if I did some mistake I’ll be kept in the text mode until fixing that pointed error).

For example, I write “End Classs”, my object is not made available on the navigator, because right now it is just a garbage code needing fix and pointed in the “Errors Panel”. :wink:

You could grab the code generator classes I wrote 8 years ago.
They write XML files but they can be used to write code you can drag & drop into a project.
Wrote a DB based tool using them.
It read the DB schema & spit out all the classes for the DB interface with all the nice operators etc so everything autocompleted was type safe etc etc etc

[quote=30074:@Norman Palardy]You could grab the code generator classes I wrote 8 years ago.
They write XML files but they can be used to write code you can drag & drop into a project.
Wrote a DB based tool using them.
It read the DB schema & spit out all the classes for the DB interface with all the nice operators etc so everything autocompleted was type safe etc etc etc[/quote]
If this is written for RB/Xojo then I would like to take a look, if only to see how you expect a ‘data access layer’ to be coded. Where can I find the code?

Oh the tool used these classes to generate the code.
The tool is not there - that was a “work for hire” so I cant give the source away but the classes we agreed I could do what I wanted with them.
And none of it required introspection :stuck_out_tongue:

http://www.great-white-software.com/REALbasic_Code.html