Class actions
No edit summary
m ((username removed) (log details removed))
 
(8 intermediate revisions by 3 users not shown)
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 ViewModel [[VCurrent and vSelected|vCurrent or vSelected]] variables. A class action, therefore, is always based upon the object itself in the model, not on any information from the [[ViewModel]]. 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 they are then 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. 
You show a class's 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
[[File:Class Actions - Image 1.png|frameless|84x84px]] 


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 "Add Class action." 


The drag action is when one object is dragged on screen from one object on top of another one.   
[[File:Class Actions - Image 2.png|frameless|342x342px]] 


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.   
This window pops up.    


If you click on the enable expression or the execute expression you can see that the context is the class itself.   
[[File:Class Actions - Image 3.png|frameless|565x565px]]   


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.   
When 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.   


In other respects you can see the general action information.
Name the class action using camel case. That camel casing will then be split with spaces in between; it will give you an easy way to have a good action name until you want to change the presentation. 
 
[[File:Class Actions - Image 4.png|frameless|238x238px]] 
 
If you click on the Enable Expression or Execute Expression, you can see that the context is the class itself. 
 
[[File:Class Actions - Image 5.png|frameless|339x339px]] 
 
If you use "self" here, you will get the SysSuperClass in this example as a context - because it is a class action and always has its root or context as an instance of this class. 
 
[[File:Class actions Image 6.png|frameless|483x483px]] 
 
In other respects, you can see the general [[Actions|action]] information.
{{Edited|July|12|2024}}

Latest revision as of 06:38, 14 March 2024

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 ViewModel vCurrent or vSelected variables. A class action, therefore, is always based upon the object itself in the model, not on any information from the ViewModel. 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 they are then available wherever that object is shown within your application. 

You show a class's class actions by clicking on the little arrow triangle at the top of the class from the diagram view. 

Class Actions - Image 1.png 

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

Class Actions - Image 2.png 

This window pops up.  

Class Actions - Image 3.png 

When 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. 

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

Class Actions - Image 4.png 

If you click on the Enable Expression or Execute Expression, you can see that the context is the class itself. 

Class Actions - Image 5.png 

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

Class actions Image 6.png 

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

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