Hi Andrés,
Due to the new CSS-based core styling system that I have implemented in RC4, some dialog windows may need a bit of additional work to access appearance properties such as fonts and colors. Fortunately I have anticipated these problems, so I have added a new method to PJSR to simplify this task:
void Control.restyle()
By calling this method a control can ensure that all CSS-defined properties have been fetched and applied properly. This method must be called before attempting to access any appearance related properties. Your example script works perfectly if you add a call to this method as follows:
function TestDialog()
{
this.__base__ = Dialog;
this.__base__();
this.restyle(); // new in RC4
var labelWidth = this.font.width("Background magnitude:M");
...
Not all dialogs need early restyling, but when these problems happen, calling this new method fixes them.