‘
I have been working on Redline Smalltalk for some time, and just now I have made some changes that I am very proud of.
With the new additions it is now possible to automatically integrate Java classes with Redline Smalltalk allowing you to talk to Java classes as though they were 1st Smalltalk objects. There will be a longer more detailed post on this topic in the Redline blog very soon. The 2 second brief on how to integrate a Java class is to put the following in your Smalltalk script or class.
import: ‘com.domain.JavaClass’ as: ‘LocalName’.
What the above does it allow you to refer to com.domain.JavaClass via the identifier ‘LocalName’. The object referenced by ‘LocalName’ is a Smalltalk object and responds to messages just like any Smalltalk object.
Behind the scenes Redline Smalltalk uses Java Reflection to query the Java class and generate Smalltalk code that represents an Adaptor for the class. This Smalltalk code is then compiled on the fly to JVM bytecode and executed.
I’m proud of this work and I really hope you give it a try, and come back to the Redline blog for the full details .