|
|
|
|
|
- General extension attributes
- Extension attributes specific to OOP and MVP
- Extension attributes specific to variables
- Extension attributes specific to local/global or internal procedures
- Extension attributes to manage timers
- Extension attributes to manage threads
- Remark
List of extension attributes
Extension attributes are special WLanguage statements that allow you to add specific properties or functionalities to variables or procedures. These extension attributes help simplify code and facilitate the maintenance of your applications. WINDEV, WEBDEV and WINDEV Mobile support several extension attributes. This page presents the different extension attributes available, grouped by theme. The extension attribute categories are: To simplify the input of extension attributes, the code editor automatically proposes the list of available extension attributes when the "<" key is pressed. For more details, see Automatic completion. General extension attributes The general extension attributes are: | | C# | Used to define a WLanguage procedure that can be called via a C# code. | GUI / UI | Used to specify the use of the variable or procedure in a code or process containing both UI code and Business logic. | Java | Used to define a WLanguage procedure that can be called via a Java code. | Business logic | Used to specify the use of the variable or procedure in a code or process containing both UI code and Business logic. | ObjC | Used to define a WLanguage procedure that can be called via an Objective-C code. | browser synchronized | Used to make a global server variable available on the browser side. The content is synchronized. The value assigned to a "browser synchronized" global variable in server code is retrieved in a browser code executed later. The value assigned to a global variable in a browser code is retrieved the next time a server code is executed. Limit: To avoid overwriting, changes are synchronized only: Caution: Changes are not synchronized for the server code of an Upload control or Clickable Image control because these processes do not send the value of the controls to the server.To use this extension attribute it is necessary to use the framework V2 of the browser code. | xmlAttribute | Used to specify that the member is created as attribute (instead of tag). |
Extension attributes specific to OOP and MVP The extension attributes specific to OOP and MVP are: | | Serialize | Used to manage the serialization of each class member or structure member. For more details, see: | no step into | Used to specify that a method will be ignored by the debugger when debugging in "Step by step" mode. | immutable | Indicates that a method or all methods in a class are immutable: once its value is set, it cannot be changed. | presenter | Used to associate a class of the presenter layer with a view (window or report). | mapping | Used to specify the name of member that will be "mapped" to the structure member or to the class member. For more details, see: | associated | Used to access the members, the methods and the properties of a Model class from its Presenter class without having to perform any "rebounds". | copy | Used to specify the operation to be performed when copying an instance of an object. - <Copy=Clone>: when used on a dynamic object, this extension attribute allows forcing the cloning of the object.
- <Copy=False>: when used on a member, this extension attribute prevents copying the member's value when copying an object to another object.
| force destructor | Forces the call to the destructor (deletes the object), even if an element holds a strong reference to this object. | weak | Indicates a weak reference. In this case, objects will be automatically deleted according to their scope (even if a global reference was taken on these objects). The low reference must be specified during the dynamic instantiation of the object taking reference. | note | Allows you to insert a comment about a class member (<note=Comment about the member>). The content of this note can is returned by the AttributeNote property of a Variable Description. Reminder: The Variable Description type is used to get information about a class or structure member. |
Extension attributes specific to variables The extension attributes specific to variables are: | | Controller | Indicates that a variable is controller in a test script code. This controller variable can then be used in the test code, for example to check the result of a procedure. | undetectable | Automatically obfuscates the content of the string in memory. | immutable | Indicates that the variable is immutable, i.e. its value will not change once assigned | critical section | Used to associate a critical section with a variable. | browser synchronized | Used to synchronize a variable global to the project to make it available on the browser side. In this case the value assigned to a global variable in a browser code, can be retrieved later in a server code. | server only | Used to protect a variable global to the project to make it unavailable on the browser side. | useful | Prevents a warning message from being displayed when a local variable is not used. | zombie | Used to specify that a variable or a procedure is obsolete and that it should not be used anymore. |
Extension attributes specific to local/global or internal procedures The extension attributes specific to local, global or internal procedures are: | | report name | Allows you to directly use the name of a project report in the procedure parameters. | window name | Allows you to directly use the name of a project window in the procedure parameters. | page name | Allows you to directly use the name of a project page in the procedure parameters. | automatic | Used to specify that this procedure will be run automatically after the initialization code (of the window, page or project). | end process | Used to specify that this procedure will be executed when the process containing the procedure call is finished. | end event | Used to specify that this procedure will be run after the event that contains the call to the procedure. | zombie | Used to specify that a variable or a procedure is obsolete and that it should not be used anymore. | useful | Used to avoid a warning when a procedure declares some parameters that are not immediately used. | no step into | Used to specify that a procedure will be ignored by the debugger when debugging in "Step by step" mode. | extension | Used to specify that a global procedure that handles a WLanguage type can be used as a native function. |
Extension attributes to manage timers The extension attributes specific to the management of timers are: | | timer | Used to specify that the procedure will be run in a Timer. | repetition | Used to specify that the procedure is called several times in a row (repetitions). | interval | Used to specify the duration (interval) between 2 calls to the procedure. | call again | Used to specify, in a procedure called in a Timer, the operating mode of subsequent calls. | delay | Used to specify the wait time before the start of the procedure in a Timer (during the first call). |
Extension attributes to manage threads The extension attributes specific to the management of threads are: | | thread | Used to specify that the procedure will be run in a secondary thread. | main thread | Used to specify that the procedure will be run in the main thread. | main thread asynchronous | Indicates that the procedure will be executed in the main thread and that there is no need to wait for the end of the execution of this procedure. | secure thread | Used to specify that the procedure will be run in the secure secondary thread. | light HFSQL context | Triggers the immediate copy of a part of the current HFSQL context. | full HFSQL context | Triggers the immediate copy of the current HFSQL context. |
You can combine several extension attributes using the syntax, according to the type of declaration and the object used: Declaration of my object <Name Attribute 1=value1, Name Attribute 2=value2, ...> For example, for a declaration of a buffer variable: Class m_buffer is Buffer <serialize=false,mapping="ImageMemo"> END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|