In my opinion, one of the Xojo IDE’s greatest strengths is its autocomplete engine. Whilst it isn’t perfect (Using
clauses I’m looking at you ) I think it’s pretty impressive. One of the features that I like is the description pane (@npalardy might know its actual name):
As you can see, when you hover over a method or property, the method signature is displayed but also underneath you may be treated to a description of the item
Did you know that you can add descriptions to methods and properties that you create in your own classes and methods? This is a really good way not only to help annotate your code if you share it and make it easier for other developers to use but I find it a really good self-documenting mechanism to help me remember what a method or property is for simply by hovering my mouse cursor over the code in the editor.
Here’s an example of it in action, hovering over a simple method on a Vector
class I have:
Notice how the description pane at the bottom not only provides the method signature but also provides a description of what the method does: “Divides this vector by the given scalar and returns this vector.”.
How do I do this?
Adding descriptions to methods or properties is really easy. Add the method / property as usual and then in the right hand inspector pane, click the “cog/settings” button. Then just enter the text you want to appear in the Description
test field:
I strongly encourage you use this feature if you don’t already as I find it invaluable.