Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinDev Aspects
Message
De
27/01/2013 12:00:39
 
 
À
27/01/2013 11:18:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
WinDev
Catégorie:
Autre
Titre:
Divers
Thread ID:
01563218
Message ID:
01564308
Vues:
103
>>Do I understand the question correctly that you are asking if one can create custom objects with properties and methods. And then be able to create multiple instances of that custom object? If that is the question then the answer is yes. And it is done so simply; New class, name it, create it. Right click the class in the project window, add new property/method, name it, enter assign/get code for a property or enter code for a method. Would you like to see the screencaps for that process?
>
>No, I got that from the brochure, that part was clear enough. I meant containership - like when you have member objects which have member objects etc, and each has a .parent property as a pointer to the object it is a member of. As we have in Fox, thisform.container.pageframe.page1.container.textbox - how is that done in WinDev? I guess there must be a way, at least in the web edition, where the HTML document itself has multiple levels of containership, I'd expect the same to apply to the language.

Virtually exactly like VFP. For example,

I create a custom control called MyContainer (doesn't have to be custom control, applies also to standard controls):
.... It has a button called MyButton.
.... It has a table called MyTable with 2 columns.
........ Column 1 is called COL_1
........ Column 2 is called COL_2.

I put this custom control on a form/window. I can now reference all aspects of this container and set properties etc. like this:

Get the caption of the button:
MyContainer.MyButton..Caption
Get the caption of the column 1:
My Container.MyTable.Col_1..caption
Set the caption of column 2:
My Container.MyTable.Col_2..caption = "Hello World"
So you reference objects with a single dot (.) and the properties of an object with a double dot (..)
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform