Thursday 16 April 2009

Syntax Highlighter Module Released for REALbasic Developers

I released my Syntax Highlighter Module for REALbasic Developers today. The example application can be downloaded from http://www.rbtools.net/.

Download the Example Application to test the Syntax Highlighter with the supplied SQL Keywords file or alternatively your own Keywords file.

The Syntax Highlighter Module operates against any EditField in your REALbasic Application. As you type, your words are matched against a text file containing keywords, words that you wish to have highlighted in some way on your EditField, an example would be a SQL Query or a Language Editor.

Whatever you type in the EditField is highlighted if contained within your Keywords File. This text file can be easily created and then edited to include or exclude additional keywords.

The Syntax Highlighter is supplied as an Encrypted RB Module which you include in your own applications. There are no royalty fees involved.

The encrypted module and the unencrypted example application will be sent to you via email following purchase via Paypal from our website at http://www.rbtools.net. This encrypted module can be used in any of your projects without limitation or credit.

To use the Module within your own application, follow these simple instructions:

1. Create your text file of Keywords
2. Load the Keywords file (possibly at program startup) with the following code:
mSyntaxControl.LoadKeywordsFromFile(FILENAME)
3. Place the following code in the EditField TextChange Event:
mSyntaxControl.ChangeText(me,True,True,True,&c0000FF)
The Parameters are: (EditField, Capitals as Boolean, Bold as Boolean, Colour as Boolean, Colour Value)

Words within single or double quotes are not affected and neither are words that are part of another word.

A screenshot of the example program is shown below:



Updates to this module will be made over time as feedback comes in and as it is used in one of my own products I will no doubt be adding enhancements over the next few weeks / months.

www.artenscience.co.uk
Quality Commercial Software and Custom Software Development

No comments: