Smallworld 5 Compatibility

This page is to discuss how to keep magik code compatible between 4.x and 5.x. Primarily for vendors trying to support both versions, but can be used by those transitioning to 5.



SW5 introduce 2 new exemplars to support running processes in a separate thread. They are sw_task and sw_task_owner. All engine code such as models or plugins should inherit from sw_task_owner in SW5. Attached to this page is a 4.3 version of the exemplar so you can move your existing engines over to the new exemplar. Not all functions work, but it does allow for compiling 4.3 and 5.X code with the same magik files.

Magik Syntax

_class Directive

In SW 5, magik classes can inherit from Java objects. the newer definition of this uses the _class directive such as the following.

  { _class |com.gesmallworld.magik.language.MagikFinalisable|}

This definition will not compile under 4.x. Attached ignores the _class directive. The following are some restrictions. See file comments for additional info.

  1. {_class |java.objec|} must be on one line
  2. Only one _class definition can be used
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License