Article Preview
Buy Now
COLUMN
Using Attributes
Xojo thoughts, news and tips
Issue: 21.2 (March/April 2023)
Author: Paul Lefebvre
Author Bio: Paul Lefebvre is a Xojo Software Engineer. He has been using Xojo and its prior versions since 2001.
Article Description: No description available.
Article Length (in bytes): 6,947
Starting Page Number: 60
Article Number: 21207
Related Link(s): None
Excerpt of article text...
Just a quick note to let you know that Xojo 2023 Release 1 will have entered pre-release testing by the time you read this. We always appreciate your testing assistance. Xojo is a large project and the more scenarios that get tested, the better it will be. If you'd like to help, contact Xojo at
hello@xojo.com
.All About Attributes
When you create your own classes in Xojo, there is a little-known feature that you might find useful: Attributes and the Attributes Editor.
Attributes are user-defined name-value pairs that are attached to a class or class member. By themselves, they don't do anything. But with Introspection, you can look up Attribute values at runtime and use their values to make code behave a certain way.
Note: When specifying an attribute
value that is a string, you must put it in quotes! The attributename only needs to be in quotes if it contains spaces or a keyword.Before diving into how to access attributes at runtime, I want to point out a few "special" attributes that actually do something in your projects. These special attributes are:
...End of Excerpt. Please purchase the magazine to read the full article.