Smallworld 5 Upgrade Information

Recommend Code Updates

  • concurrent_hash_map is faster than property_list or hash_tables. GE recommends using this. It appears that the keys do have equality functionality, but not for database objects. For example chm["test"] will work but chm[an_obj] doesn't.
  • fork() or fork_at() replace with sw_task_owner functionality. Plugins can leverage application' sw_task_owner by calling do_work() on application.

Data Model Migrations

Review GE's page: for Data model Updates.

ICO -> PNG Conversion

ICO files are no longer supported for icons in Smallworld 5. I have noticed that using conversion programs such as IrfanView, the results are a very black icon. Mostly because the translucency hasn't been converted correctly.

The settings that seem to work best are setting the black as the transparent color, no PNG compression (0 in IrfvanView in file format options), and forcing the PNG icon to be 16 colors (in advanced bach options of IrfanView).

IcoFX (free) works better. They have a Tools->convert option. This will add size info to the PNG files. Also create multiple sizes if ico had that. IcoFX does a better job with color conversion.

CUR -> PNG Conversion

The converted PNG file must be have the dimensions and _cur appended to the file name. For example: dynamic.cur must be named dynamic_16_16_cur.png. This assume the size of the PNG is greater than 17x17 pixels and the "hotspot" or click action will take place at pixel 16,16.

The hotspot is defined by the ##, ## of the _##_##_cur appended name.

Application Look and Feel


Some people don't like look of the new icons in SW 5. Attached to this page is a zip file of the 4.3 ICO files converted to PNG.

Real Estate

The out of the box application has sacrificed work space for larger icon placements and taller tabs. As a puck monkey, I want the most map space available. There is a SWIFT theme mechanism that is not really documented that is available called sw_swift_manager. You can get & create sw_swift_theme that modify the application. Before you start saying (like I did) I need to modify the SWAF application… It appears SWV all GUI widgets are converted into SWIFT items. So SWIFT manager does affect SWAF applications… Below is some settings and tab container code that I found gives most usable space.

Between the attached icons (PNGs) and the code, it gives about the same real estate as 4.3 applications did.

Panel Based GUIs

Older Panel based GUIs may have issues under SWV. The conversion from panel to SWIFT based rowcol (Yes in SWV everything is SWIFT based, it translates older components to SWIFT components) is not always correct. The resizing especially is very hit or miss. The best thing I have seen is to convert your panels to row cols and define the sizes as much as possible. Letting it to automatically do that leads to issues.

Icons Directory

You can put the PNG icons (converted above) into the resources/icons directory. You can keep your original ICOs in bitmaps. This allows you to have v5 and v4 icons within one module.[1]

1. Christoph Decking
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License