Class actions
No edit summary
No edit summary
Line 1: Line 1:
Class actions are actions that always have the context or the root objects as the object of a class. A class action cannot use the view models vcurrent or vselected variables.  A class action, therefore, is always based upon the object itself in the model, not any information from the view model.  But they are globally available to every view that shows an object of this class.   
Class actions are actions that always have the context or the root objects as the object of a class. A class action cannot use the view models vcurrent or vselected variables.  A class action, therefore, is always based upon the object itself in the model, not any information from the view model, but they are globally available to every view that shows an object of this class.   


Preferably you make class actions for everything that can be class actions because then they are available wherever that object is shown within your application. 
Preferably, you make class actions for everything that can be class actions because then they are available wherever that object is shown within your application. 


You access a class actions by clicking on the little arrow triangle at the top of the class from the diagram view. 
Access class actions by clicking on the little arrow triangle at the top of the class from the diagram view. 


Or directly access available actions and also add an action you right click on the class header and select class action. 
() 


When you are showing this view with class actions you can also create new class actions and you can create drag actions.   
Or directly access available actions and also add an action. Right-click on the class header and select class action


The drag action is when one object is dragged on screen from one object on top of another one.   
() 
 
When you are showing this view with class actions, you can also create new class actions and drag actions. The drag action is when one object is dragged on screen from one object on top of another one. 
 
()   


Name the class action using camel case. That camel casing will then be split with spaces in between and it will give you an easy way to have good action name until you might want to change the presentation.   
Name the class action using camel case. That camel casing will then be split with spaces in between and it will give you an easy way to have good action name until you might want to change the presentation.   


If you click on the enable expression or the execute expression you can see that the context is the class itself.   
() 
 
If you click on the enable expression or the execute expression, you can see that the context is the class itself
 
() 
 
If you use self here, you will get the super class as a context. That is because it is a class action and always has its root or context as an instance of this class.   


If you use self here you will get the super class as a context. That is because it is a class action and always has its root or context as an instance of this class.   
()   


In other respects you can see the general action information.
In other respects, you can see the general action information.

Revision as of 06:52, 7 August 2023

Class actions are actions that always have the context or the root objects as the object of a class. A class action cannot use the view models vcurrent or vselected variables.  A class action, therefore, is always based upon the object itself in the model, not any information from the view model, but they are globally available to every view that shows an object of this class. 

Preferably, you make class actions for everything that can be class actions because then they are available wherever that object is shown within your application. 

Access class actions by clicking on the little arrow triangle at the top of the class from the diagram view. 

() 

Or directly access available actions and also add an action. Right-click on the class header and select class action. 

() 

When you are showing this view with class actions, you can also create new class actions and drag actions. The drag action is when one object is dragged on screen from one object on top of another one. 

() 

Name the class action using camel case. That camel casing will then be split with spaces in between and it will give you an easy way to have good action name until you might want to change the presentation. 

() 

If you click on the enable expression or the execute expression, you can see that the context is the class itself. 

() 

If you use self here, you will get the super class as a context. That is because it is a class action and always has its root or context as an instance of this class. 

() 

In other respects, you can see the general action information.

This page was edited 65 days ago on 03/14/2024. What links here