Modeling

Debugger news 2019 #1

New way to hold multiple expressions per session:

image

For each expression you add you can bring up OclEditor or execute. You can now use the new debugger and OclEditor in runtime.

image

Only one expression is active at a time – and it is marked with “Current”. This is the expression that is executed when you press F5. The result list is populated with the result from this expression. For all the classes available in your model you can easily get the expression for selection or creating objects. An expression is of one of three types:

  • Ocl – query with no side effect
  • Action – introduce operators with side effects lite .Create and assignment := 
  • OclPS – translates a subset of Ocl to Sql for searching the persistent storage and taking taking advantage of the power of SQL-Server

Even if expressions are great and the actual language of your system anyone can guess the simple searches that developers will want to do on classes based on the attributes of the class. When you press the new “Seeker”-button for a particular class we guess based on current class definition and create a seeker – i.e. a form that make use of MDriven SearchLogic with search expressions that evaluate in persistent storage:

image

The Seeker form also has a “Create New”-button for convenience.

Note that newly created unsaved objects will not show up in searches from persistent storage until they are saved for the first time. Also note that the filter values apply to the values in the database that may be different in the in-memory object – since the in-memory object may have changed state that is not yet saved.

Objects in the Search result grid can be double clicked and bring up an auto generated object form:

image

This generated object form takes its background color from the Default color you have assigned to your class in the designer. All properties are editable in this kind of object form – contrary to the seeker – where all the cells of the result grid is read only.

Single links will show up as ComboBoxes – but they will not list all available items since these may be too many. You are only given two options – double click the combobox to bring up the currently linked object – or choose unlink the current object.

To associate objects you use drag and drop:

image

For objects having multilinks you get buttons that can bring up content of link in new tab:

image

You can drag to and from the multilink lists to associate objects according to the rules of your model:

image

And from multi to other multi:

image

The multilink tabs also offer a button for creating a new object of the associated class and adding it to the link – and a button to unlink a linked object from the association.

Do not confuse the above described Object forms with the Autoforms. The Autoforms in the designer are good for adding forms to your model quickly – but sometimes you need to inspect data in runtime that you have not a designed form available for. This is when the Object form in the debugger helps you out.

The debugger ties in with Wecpof based UI and allows you to drag objects between them in multiple ways. When dragging objects into the debugger window you get a new variable created and updated called vDragged – you can use this variable in expressions to act on objects. When dragging objects into Wecpof-ui it will try and find a designed ViewModel that requires root object of the correct type and then show this.

image

Leave a Reply

Your email address will not be published. Required fields are marked *