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
Thursday, 16 April 2009
Syntax Highlighter Module Released for REALbasic Developers
Saturday, 19 July 2008
More Oracle and REALBasic using MBS and Java

I have managed to get REALbasic talking to Oracle via the Java classes enabled by the MBS Java Plug In.
It was quite straightforward in the end, the code is shown below:
'Requires the Oracle Java Driver Resident in the Program Directory
'(ojdbc14.jar)
'Requires the MBS REALbasic Java Plugin.rbx to be in the Plugins Directory
'Requires the MBS REALbasic Main Plugin.rbx to be in the Plugins Directory
'This Function Should be Called as Follows:
'mCodeBaseDB.OpenOracleDatabase("jdbc:oracle:thin:@//HostIPAddress:PortNumber/ORACLESID","username","password")
dim j as JavaDatabaseMBS
dim r as JavaRecordSetMBS
dim f as FolderItem
f=GetFolderItem("ojdbc14.jar")
j=new JavaDatabaseMBS(f,"oracle.jdbc.driver.OracleDriver")
j.Host=strHostName
j.UserName = strUserName
j.Password = strPassWord
if j.Connect then
mCodebaseStd.DisplayInformationMessage("Successfully Connected to Oracle ...")
else
mCodebaseStd.DisplayStopMessage("Could Not Connect to Oracle ..."+EndOfLine+"Error Message: "+j.ErrorString+EndOfLine+"Error Code: "+str(j.Errorcode))
end if
The Oracle Java driver can be found in the /jdbc/lib directory of your ORACLE installation. This can be copied, and I have put it in the client application directory. The MBS Plugins need to be inside the Plugins directory of your REALbasic installation. The comments at the top of the method show how this method should be called to get a successful connection to Oracle, three parameters are needed, ORACLESID, UserName and Password.
The methods referred to when j.Connect is called are my own custom methods for displaying dialogs to the screen. They can be replaced by standard MsgBox calls.
My next challenge is seeing how powerful and reliable it is to access Oracle from REALbasic using these classes and Plug Ins :-)
"If you limit your choices only to what seems possible or reasonable, you disconnect yourself from what you truly want, and all that is left is a compromise." - Robert Fritz
www.artenscience.co.uk
Honest Expert Independent Technology Advice for Business
Oracle / REALBasic / Java Classes Etc.
I’ve been looking into the best database to use for a commercial product that I’m planning. As it stands I’ve settled on Oracle. My reasons are as follow:
I know how to use Oracle (a *good* starting point !).
The XE Edition is limited, but free and makes a good starter database for smaller systems.
Development against XE works identically against the bigger versions if an upgrade becomes necessary later.
Oracle is stable and extremely reliable.
Oracle can be installed on multiple Operating Systems.
The next choice is what to use to develop the front end software. I am very keen on writing software that works on multiple platforms, Windows and Mac OSX primarily, although I do support Linux wherever possible.
For the kind of software I want to write I don’t want it to be browser based. I know it’s the ‘in thing’ but still the *vast majority* of software is written for the desktop and I much prefer desktop based software myself. I don’t see it going away any time soon.
For cross platform based development there are a few choices, however by far the easiest and most straightforward is REALbasic from REAL Software. It has it’s limitations, but in it’s favour I can develop on the Mac and deploy to both Windows and Linux. In addition there is none of the extra hassle of needing the .NET Framework installed on Windows. One company, MonkeyBread Software from Germany seem to have built their business on providing ‘Plug Ins’ for REALbasic to enhance the capabilities of the development environment. It was to them I had to turn for a solution to connecting to Oracle from REALbasic.
REALBasic comes with an Oracle Plug In, however due to Oracle taking around 2 years to provide an Intel based driver for the Mac, the standard REALbasic Plug In does not now work (at least on Mac OSX). I’m sure they will remedy this at some point. In the meantime I have downloaded and been playing with the MonkeyBread Software ‘Java Plug In’. This allows the Java driver and Java classes to used from within REALbasic to access databases that cannot be connected to from REALbasic.
If all works as expected I will be sending MonkeyBread my credit card number for the 40 Euros or so they charge for the Plug In :-)
"We are all here for a spell; get all the good laughs you can." - Will Rogers
Saturday, 8 March 2008
OSX / Realbasic and Oracle

Despite the Intel Macs having been around for a couple of years of so, it seems Oracle have not yet got around to creating a native Oracle DB client for OSX on Intel. Apparently it is due ‘soon’ according to Oracle. There are a couple of work-arounds fortunately and the one that seems to be working well for me so far, is creating a Universal Binary Macintosh application running against Universal Binary ODBC Drivers from Actual.
The Oracle ODBC Drivers are $29, seem to work well and are easy to install. An advantage of using these is that your other Mac applications such as Word, Excel and Filemaker can also access Oracle through these drivers.
I’ve yet to use them for any ‘heavy duty’ work however so time will tell just how suitable they are for me.
Actual also make ODBC drivers for the other popular SQL Databases.
"Don't let the bastards grind you down." - General Joseph W Stillwell

