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 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.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 6.5

COLUMN

Just-in-Time References

Another Delegate Example

Issue: 6.5 (July/August 2008)
Author: Charles Yeomans
Author Bio: Charles is a senior software engineer at Dakim, Inc.
Article Description: No description available.
Article Length (in bytes): 6,235
Starting Page Number: 46
Article Number: 6517
Related Link(s): None

Excerpt of article text...

Let me begin this issue's column with a brief sketch of a logging framework I wrote. The idea is that one has various targets for log messages -- file, console, system, memory. The targets are to be assigned and possibly changed at runtime. It supports sending messages to multiple targets, and filtering of messages by urgency -- fatal, error, warning, status, debug, trace.

This is expressed in code as a class interface, LogTarget, and several classes implementing LogTarget -- LogTargetFile, LogTargetConsole, etc. A LogTargetComposite class contains references to other LogTargets, and handles the forwarding of messages to these targets. And a LogTargetFilter class, which wraps another LogTarget, filters the messages it passes on.

Finally, there is a Logging module that holds a reference to a default target, plus methods that provide convenient, global access to that target.

...End of Excerpt. Please purchase the magazine to read the full article.