Tuto WINDEV 25

428 Part 7: Advanced programming Simple example ▶ To illustrate these concepts, we will be using the training example named "WD Simple OOP". 1. Open the training example named "WD Simple OOP". 2. Run the test of this example. 3. Click the different buttons corresponding to the animals in order to add them. 4. Stop the example test to go back to the editor.Remark: We won’t go into details about the syntax of OOP but we will present a simple example of an object-oriented program. See the online help for more details (keyword: "OOP, Class"). Declaring a class ▶ WINDEV allows you to easily declare the classes from the "Project explorer" pane. To create a class: 1.  In the "Project explorer" pane, select the "Classes" folder 2. Display the popup menu of this folder (right mouse click) and select "Create a class". 3.  In the window that is displayed, specify the class name ("TestTUT" for example) and validate. ▶ Study the WLanguage code of cSavanna class used in the example. 1.  In the "Project explorer" pane, select the "Classes" folder 2. Open the "Classes" folder (to do so, click the arrow found in front of the folder name). 3. Double-click the cSavanna class.

RkJQdWJsaXNoZXIy NDQ0OA==