Smallworld 5 BOLOs

Be On the Look Out!!! These are things to look for if you have weirdness with Smallworld 5 that worked under previous versions….

SWIFT Issues

Resizing/Redrawing Issues

Here are a few things to check…

  • Verify that you aren't creating a secondary sw_canvas_container instead of using a sw_container. The top most container under a frame should be sw_canvas_container, but containers under this should not be sw_canvas_container, except for specialized coding…

Tabular_list_view Issues

The pre SWIFT tabular_list_views don't really work within SW5 that well. The sizing is all messed up if on a panel, or even on a multi row/col rowcol object. The best way I have seen to get the tabular_list_view working correctly is to place them inside a 1x1 rowcol object. You should still use num_rows option on the tabular_list_view along with height on the rowcol.

Java Related

JARs are Locked

JARs are Locked This link provides details about JAR locking and builds.

Streams

Weird stuff with text input streams

I was seeing a "Failed to translate characters: %nul" pop up (at which point I had to kill Smallworld as there was no end to it). Error raised was text_converter_strange_input. This was reading a stream from a HTTP request. It turns out you need to define the encoding like the following before initializing the stream. Same code worked fine in 4.3, but in 5.1.5 it was failing.

_dynamic !text_encoding! << :iso8859_1

Session Start up

Errors

  • {Error: unset define_shared_constant() may not be used on unset}

If you see this during session load with compiled JAR files, but it works without the compiled jars. Check that there is a package definition on top of the file. Setting this to appropriate (probably user) will fix you problem. Or at least identify the next problem:)

Code

Inter-Package Inheritance

Magik allows you to inherit from "foreign" packages. (those that the current package do not inherit from)

Typical syntax looks like the following. Notice the '@' package reference.

_package user
$
def_slotted_exemplar(:user_explr,
    {{:s2,_unset,:writable}
    },{@test1:t1_explr})
$

However in SW5, you can call a _super.a_method() within a locally defined a_method(). The following error occurs.

AS of 5.1.9 and 5.2.2 This is still an error. However there is a work around.

  • Create an current package exemplar that inherits from the foreign package
_package user
$
def_slotted_exemplar(:user_explr,
    {{:s2,_unset,:writable}
    },{@test1:t1_explr})
$
  • Do not create any local methods!
  • Inherit from the current package exemplar
[[/code]]_package user
$
def_slotted_exemplar(:user_explr2,
    {{:s2,_unset,:writable}
    },{:user_explr})
$
The user_expl2 can subclass t1_explr methods and call _super successfully. package_test.magik has an example of this.

Serialisation

SER files for product serialisation do not seeme to compatible between versions (even dot releases). It is best to regenerate these whenever anything changes with the core or your layered product. For vendors, probably best not to send SER files with your delivery.

Application Start Up Errors

Administration

If the application seems to start up and then disappears quickly, check the following

in config.xml ensure:
 <plugin name="control_panel" class_name="swift_control_panel_plugin">
versus pre sw5:
 <plugin name="control_panel" class_name="control_panel_plugin">
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License