Article Preview
Buy Now
FEATURE
Working with Bitmasks
How to present and manage bitmask data
Issue: 15.1 (January/February 2017)
Author: JC Cruz
Author Bio: JC is a freelance writer based in British Columbia. He is a regular contributor to MacTech Magazine and Dr Dobb's Journal. Away from the writing pile, JC spends quality time with his nephew, as a proper uncle should.
Article Description: geNumber>46
Article Length (in bytes): 42,449
Starting Page Number:
Article Number: 15106
Resource File(s):
project15106.zip Updated: 2017-01-02 14:50:56
Related Link(s): None
Excerpt of article text...
State data can take the form of several state flags or a single bitmask value. In today's article, I shall explore the benefits of using bitmasks to represent states. I shall introduce the two control widgets used to display and accept state data.
Next, I describe how I customize those widgets, streamlining their behaviour and reducing boiler code. And I demonstrate how I use the custom widgets.
Readers must have a working knowledge of Xojo. The demo project
FooFlags is available from the magazine's website.States as Data
I often have to use state data when working with database records, with preferences settings, with user data in general. State data are usually Boolean types, but some are integers, each integer value specifying a state level.
Types of state data
...End of Excerpt. Please purchase the magazine to read the full article.