Folders and Colors for a More Organized XOJO

In my opinion, XOJO is an extraordinary tool in every way. However, it would be very useful to have the ability to organize groups of methods, properties, and other elements into folders. In some of my projects, I create a large number of properties and methods, which makes searching somewhat problematic due to their sheer volume. By creating folders and using distinct colors, I think the application could become much more organized and easier to consult, both for personal development and collaborative work. This is just an idea on how resources created within XOJO could be better organized. Many other software applications have these features, and it would be great to see them in XOJO as well. I imagine that XOJO has other more important development and update goals, but for us XOJO users, this folder function could really help us keep our complex projects more organized.

4 Likes

Great idea! If you file a feature request I’d be happy to give it a thumbs up.

2 Likes

Thank you, Patrick, for responding to me. I will proceed with the request for this idea regarding the folders. Thanks again :slight_smile:

So i have a suggestion
 you can use non alphanumeric characters to name things. For instance, a method could be named:

~myMethod

You can also use emoji:

🍁myMethod

Colors are going to be tricky since the IDE currently uses color to indicate scope.

3 Likes

I would love to see how AutoComplete deals with that, and how the user will type that emoji to trigger it. :slight_smile:

1 Like

While I don’t disagree that the IDE is frustrating to navigate, I wonder if your data design might also be problematic?

For example, in databases, one often sees something like this:

var EmailAddress1 as string
var EmailAddress2 as string
var EmailAddress3 as string
var EmailAddress4 as string
var EmailAddress5 as string
...

When the more “proper” solution would be to have a related table like this:

var EmailAddresses() as string

Can you show us an actual screenshot of your real-world app where you find the IDE limiting?

1 Like

Using containers alleviates a large part of the need for more organisation. But I have some larger classes where better organisation would really help. For instance I have a singleton which handles my settings. The class has a huge number of methods (over 100):

@Greg_O : using emojis for method names is the funniest idea.

1 Like

This problem only multiplies when you have a class that implements multiple class interfaces. I would love to see interface implementation methods grouped under the name of the interface:

Class MorpeumVersilator
   ▌ Interface FooBar
       FBSprongifyPoinger
       FBDespringifyPlibbet
   ▌ Interface Blorp
       BlorpInitialize
       BlorpFlooppsterly
       BlorpSlapdown

This would also neatly surface a list of what interfaces the class implements. I suppose this would raise questions if a single method happened to participate in implementing multiple interfaces.

1 Like

When you have the same method signature on multiple interfaces, an additional option appears in the inspector that lets you specify which interface it comes from.

Alas, starting classes and methods with emojis doesn’t work.

Make class with emoji, press return and the emoji is gone:


But emojis in method names work fine:

1 Like

But type a wrong character may crash the IDE. I do not checked 2024r4.1. (I think)

You still have to possibility to use special characters, just not emojis.

1 Like

I have submitted a request for this feature to XOJO. Here is the link for anyone who wants to see it: https://tracker.xojo.com/xojoinc/xojo/-/issues/78176

As Emile says, use emoji in Methods or properties name would scary me. I see problem I have in my code with character like Ă© and ˊe .

The idea to group methods and properties in folders is good.

Isn’t the feature request the same as this one? https://tracker.xojo.com/xojoinc/xojo/-/issues/6312

1 Like

I requested this feature 4 or 5 years ago. Today, I’m giving it another shot—who knows, maybe they’ll finally implement it!

2 Likes

Colors wouldn’t be all that helpful to me personally, but what I’d love would be to be able to add folders to some existing Navigator “folders” where it’s not currently possible, e.g. Controls, Methods, Constants, Properties, etc. Yes, you can group them alphabetically with prefixes, but folders would help a lot with clutter.

Slightly OT, better commenting of constants would be great too (currently you can add // comment to the constant itself if you have to, but it’s ugly and hard to read).

1 Like

For the past year or so, always using the latest IDE version (on macOS), I’ve been using accented characters in parameter or local variable names; where those names may conflict with a Xojo type or the object’s property names, e.g., sizĂ«, rĂ«ct, wĂŻdth, heĂŻght, tĂ«xt, etc


I know the IDE knows the difference when it comes to compiling, but it makes the code more readable for me.

I’ve also gotten into the habit of prefixing private Methods with a Ω. I saw this in one of @Greg_O’s projects and I like how it sorts them to the bottom of the list of Methods, e.g., ΩDataSet(), ΩDataGet(), ΩDataRemove(), etc.

I also use a naming convention where the topic or category goes first and the verb last, so related methods are always grouped together in the list of Methods or Properties.

Lately, as a workaround for “shadowing” an existing property in a subclass, I’ve been appending a ℱ to computed property names that I add, e.g., Tagℱ, Enabledℱ, Visibleℱ, Textℱ.

So far, no complaints from Xojo during building, debugging or runtime and autocomplete works fine with them.

2 Likes

I used them often (even made the exercice to use french variable/method names in a not-so-little project), so you definitively can use them as well.

1 Like

I filed a feature request for the folder part of this idea, three years ago. It should be implemented, because complex user interfaces with lots of elements get really messy to navigate in the IDE. You can add support for it here: https://tracker.xojo.com/xojoinc/xojo/-/issues/65737