SqPronterface

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SqPronterface

Javier Diaz-Reinoso
This is probably a retro-computing application, instead of trying to run in the last hardware my target is an iBook PCC of ~2003. So I used the old Carbon VM instead of the newer VM.

Is also an attempt to make a normal (Mac) application, instead of only add some morphs and called a program, so the app is a double-click app, have a real mac menu (using HostMenus-Mac a), don't save the image instead have a preference file in the correct directory and use the native mac choose dialog. I also tried to use HostWindowProxy but that don't work, the code is incomplete or bad documented, what are needed is an example how one can create a new World (PasteUpMorph) in the other host OS window, the DisplayHostWindow>>examplePaint is not enough.

The app is a port/mashup of MacPronterface, who is a program to control 3D-printers, is a python/Qt program, the app have an "engine" in the file printcore.py, I converted in Smalltalk "verbatim", so the flow of messages is the same, the rest of the python code is used to interface with the GUI created/run by Qt, this part I used BobsUI, that is a new version updated to Squeak 4.5 and hacked to use PluggableTextMorphPlus.

I needed a FFI dynamic library (libExtras.dylib) to implement the location of the Preferences directory and the native chooser dialog, but also ti move the Serial code from the plugin, this because I found a bug trying to open the serial port in the PPC who corrupts the squeak memory, I also found the code in sqUnixSerial.c can't work over 115200 bauds, because one of the popular "firmwares" of the Arduino called Marlin use by default 250000 bauds, I needed to modify the code (is now in the sqMacSerialV2.c file), the PPC have a top speed of 230400 by the way.

The squeak app (Intel/PPC) is about 24MB versus the python/Qt (Intel) of 95.8MB, not bad.

The app version 1.0b1 is in: