No edit summary |
(Automatically adding template at the end of the page.) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==== 2021 | ==== 2021 February, Issue With ViewModelActions ==== | ||
It was | It was possible to have self in ViewModelContextActions - but self was undefined and you were supposed to use <code>vCurrent_</code> (class actions have self but ViewModelActions do not). | ||
Sometimes it worked anyway | Sometimes it worked anyway, but it often led to strange errors and views that did not show. | ||
After this change ''you may get a lot of Model errors.'' | After this change, ''you may get a lot of Model errors.'' | ||
The fix is to replace "self" with "vCurrent_<TheViewOwningTheAction>". | The fix is to replace "self" with "vCurrent_<TheViewOwningTheAction>". | ||
For | For simple cases, doing this in the [[Training:Using the model debugger to change the model itself|Designer debugger]] may help: | ||
[[File:2021-02-02 13h54 47.png|none|thumb|666x666px]] | [[File:2021-02-02 13h54 47.png|none|thumb|666x666px]] | ||
==== MDriven Framework : | ==== MDriven Framework: We Now Require Legal OCL in All oclColumns ==== | ||
Since 2018 and with the support for VS2019, we made changes related to efficient load that make the Framework check all oclColumns. | |||
Prior to this point oclColumns could be ignored if no | Prior to this point, oclColumns could be ignored if no one ever used them, but now, we assume that they are all used and thus valid. This is in line with our shift from placed handles to compound declarative ViewModels that are statically checked along with the model. | ||
We will now throw exception if | We will now throw an exception if an illegal OCL is found in the derivation phase. | ||
If you would rather | If you would rather log this with a trace, you can do so by setting the new variable: | ||
/// <summary> | /// <summary> | ||
/// Set this property to false (default true) if you only want trace logging of failing derivations | /// Set this property to false (default true) if you only want trace logging of failing derivations | ||
Line 24: | Line 24: | ||
AbstractDeriver.ThrowExceptionOnFailedDerivation=false | AbstractDeriver.ThrowExceptionOnFailedDerivation=false | ||
==== MDriven Framework : VariableHandle | ==== MDriven Framework: VariableHandle Changed Default on AddDefaultNestings and AddDefaultProperties From True to False ==== | ||
Earlier we had AddDefaultNestings and AddDefaultProperties=true as default and this | Earlier, we had <code>AddDefaultNestings</code> and <code>AddDefaultProperties=true</code> as default and this introduced an extra unnecessary load. If you want to use "self", a better option is to set <code>AddSelfColumn</code> on the variableHandle. | ||
[[Category:View Model]] | [[Category:View Model]] | ||
{{Edited|July|12|2024}} |
Latest revision as of 15:27, 10 February 2024
2021 February, Issue With ViewModelActions
It was possible to have self in ViewModelContextActions - but self was undefined and you were supposed to use vCurrent_
(class actions have self but ViewModelActions do not).
Sometimes it worked anyway, but it often led to strange errors and views that did not show.
After this change, you may get a lot of Model errors.
The fix is to replace "self" with "vCurrent_<TheViewOwningTheAction>".
For simple cases, doing this in the Designer debugger may help:
MDriven Framework: We Now Require Legal OCL in All oclColumns
Since 2018 and with the support for VS2019, we made changes related to efficient load that make the Framework check all oclColumns.
Prior to this point, oclColumns could be ignored if no one ever used them, but now, we assume that they are all used and thus valid. This is in line with our shift from placed handles to compound declarative ViewModels that are statically checked along with the model.
We will now throw an exception if an illegal OCL is found in the derivation phase.
If you would rather log this with a trace, you can do so by setting the new variable:
/// <summary> /// Set this property to false (default true) if you only want trace logging of failing derivations /// </summary> AbstractDeriver.ThrowExceptionOnFailedDerivation=false
MDriven Framework: VariableHandle Changed Default on AddDefaultNestings and AddDefaultProperties From True to False
Earlier, we had AddDefaultNestings
and AddDefaultProperties=true
as default and this introduced an extra unnecessary load. If you want to use "self", a better option is to set AddSelfColumn
on the variableHandle.