Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 21.2

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 attribute name 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.