i

Please enable JavaScript to view this site.

Documentation 8.7

It is the part of the modeling area where the functionality of the page and its elements can be extended. Each element has a list of built-in events depending on the element type.

 

The code editing area is displayed at the bottom of the page, following a bar with icons. The icon CM0076~1_img1 in the center of the bar allows you to modify the size of the area, while the icon CM0076~1_img2 on the far right allows to close it.

 

 

MPA-EdiciondeCodigo-001

Sections

 

Javascript code editor of the page: It allows to add and update functions associated with the events of elements or pages.

 

Event handler: The event handler is displayed to the right of the code editor, it contains the identifier and the list of events of the selected element. If no element is selected, the list of page events expands.

 

Message Monitoring Console: Located below the code editor, this advanced tool facilitates the monitoring and management of messages during development.

Editor Options

 

iconoEjecutar Performs the same operation as the preview.

 

CM0079~1_img1  Increases the panel size and covers the page modeling area.

CM0079~1_img2 Returns the panel to its previous size.

 

CM0079~1_img3 Changes the style of the code editor to dark mode.

CM0079~1_img4 Changes the style of the code editor to the previous mode.

Operations of JavaScript Functions

Associate

 

The page has JavaScript functions associated with its events defined by default, unlike its elements, which do not have them.

 

To create and associate a JavaScript function with an event, select the event in the event handler, enabling the new function name to be entered. By default, a name is generated consisting of the element identifier concatenated with the event name. Clicking on the icon iconomaseventos creates the JavaScript function associated with the event in the code area, and the name of the function is added to the event list.

 

If the name of the JavaScript function already exists within the code, a number is automatically suffixed to the name.

Select

 

Selecting a JavaScript function in the event handler positions the cursor over it in the code editor.

Disassociate

 

To disassociate a JavaScript function from an event, click on the icon iconoTachito that is displayed when hovering the cursor over it in the event list. In this way, the association of the function with the event is deleted but it is not deleted from the code.

 

If the JavaScript function is deleted from the code area, it still appears associated with the event handler. However, the event does not execute any function and does not throw an error.

Message Monitoring Console

 

You can access this console by clicking on the icons corresponding to the messages, which are located in the bottom bar of the code editor.

 

 

MPA-ConsoladeErrores

 

 

If the JavaScript function is deleted in the code area, it is still associated with the event handler; however, the event does not execute any function and does not throw an error.

 

 

Upon accessing the console, the messages are displayed in an organized and categorized manner. Details about each message are provided, including its location in the code and possible solutions. The messages are updated in real time, with continuous monitoring that allows you to visualize errors and warnings as they are detected.

Message Types

 

MPA-IconosErroresRojo Syntax Errors: Detects and notifies syntax errors in the code.

 

MPA-IconosErroresAmarillo Warnings: Highlights potential issues that could affect the performance or quality of the code, providing alerts on aspects that may need attention or review.

 

MPA-IconosErroresAzul Usage Information: Identifies situations in the implementation of methods and functions, offering recommendations to improve the code.

Send us your comments
Share on X Share on Linkedin Send by Email Print