2017 June Release

Fabasoft app.ducx 2016 April ReleasePermanent link for this heading

Find out more about new features and improvements in the Fabasoft app.ducx 2016 April Release.

Syntax ChangesPermanent link for this heading

Some syntax changes have been introduced to harmonize the object model syntax with the expression syntax.

References with “#”

In simple assignments of component objects a hash can be used as marker for a component object. Currently the hash is ignored but may be used for additional context checks in the future.

Array initializers

Arrays in object model assignments now use the comma as separators instead of the semicolon.

Target VersionPermanent link for this heading

The compiler generates code for a specific target version. This version is stored in the app.ducx project file and is not changed anymore by just connecting to a web service. The properties dialog of projects display the version of the currently used web service and the specified target version.

By clicking the “Update” button the target version of the current web service is stored in the project file and subsequently used for the compiler.

Generated FilesPermanent link for this heading

Object address as comment

The generated file now contains the object address of extended objects as comments.

attrmultiple/actparmultiple

Attributes and parameters are explicitly declared as multiple when using a multiple type definition.

Expression as Type for AttributesPermanent link for this heading

It is now possible to declare an expression property by using the type expression. Additionally the useful properties of an expression property are defined as aliases.

Example

expression myexpression {

  type = BOOLEAN;
  scope = PARSCOPE_LOCALSCOPE;

  parameters = [
    {
     actparname = "info",
      actpartype = #STRING,
      actparmod = PARMOD_OUT,
      actparretval = true
    }
  ];
}

New Language Element “constant”Permanent link for this heading

In all files it is now possible to declare constant elements.

Example

private enum DrinkType {
  DT_SHOT = 800,
  DT_LONGDRINK = 850,
  DT_SOUR = 851,
  DT_FIZZ = 852,
  DT_HIGHBALL = 853,
  DT_SOFTDRINK = 1000,
  DT_WATER = 1001,
  DT_JUICE = 1002
}

struct SomeLines {
  string line1;
  string line2;  
  string line3;  
}

class Bar : ComponentObject {
  DrinkType[] barinitwith;  
  DrinkType[] barinitwithout;
  SomeLines barinfo;
}

const DrinkType[] AlcoholicDrinksConst = [DT_SHOT, DT_LONGDRINK, DT_SOUR, DT_HIGHBALL];

const DrinkType[] NonAlcoholicDrinksConst = [DT_SOFTDRINK, DT_WATER, DT_JUICE];

const SomeLines LineConst = {
  line1 = "First 1",
  line2 = "Second line"
}

const SomeLines[] LinesConst = [
  {
    line1 = "First 1",
    line2 = "Second line"
  },
  {
    line1 = "First 1",
    line2 = "Second line"
  },
  {
    LineConst,
    line2 = "Second line override",
    line3 = "Third line"
  }
];

The first use of these constants is in object model assignments:

Example

const SomeLines LineConstEx = {
  LineConst,
  line2 = "Second line override",
  line3 = "Third line"
}

instance Bar MyDefaultBar {
  barinitwith = AlcoholicDrinksConst;
  barinitwithout = [DT_WATER, NonAlcoholicDrinksConst];
  barinfo = {
    LineConstEx,
    line1 = "First line from init"
  }
}

The other use is in expressions, where the constant is replaced by its text like a macro:

Example

instance Expression ex {
  exprtext = expression {
    DrinkType aDrink = DT_FIZZ;
    if (aDrink in AlcoholicDrinksConst) {
      coort.Trace("this drink contains alcohol", aDrink);
    }
    else if (aDrink in NonAlcoholicDrinksConst) {
      coort.Trace("this drink does not contain alcohol", aDrink);
    }
    else {
      coort.Trace("this drink might contain alcohol", aDrink);
    }
    SomeLines myline = {
      LinesConst,
      line3 = "a new line"
    };
    SomeLines[] mylines = [
      LinesConst,
      {
        line3 = "a new line"
      }
    ];
    mylines = LinesConst;
  }
}

If the target version supports the object class COOSYSTEM@1.1:TypedExpression, these constants are stored as component objects and can be used by other software components, too.

Quick Fix for Missing ArgumentsPermanent link for this heading

The warning for missing arguments due to the declaration of the called use case or application now contains quick fixes to add the missing argument to the call.