Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinDev Aspects
Message
De
28/01/2013 00:58:58
 
 
À
27/01/2013 15:05:34
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:
01564326
Vues:
103
>>>Get the caption of the button:
>>>
MyContainer.MyButton..Caption
>>>
>>>Get the caption of the column 1:
>>>
MyContainer.MyTable.Col_1..caption
>>
>>Addition:
>>
>>In fact you can even directly reference the sub-object you want. For example, in the above I can reference the column 1 sub-object even without referencing the table like this:
>>
>>
MyContainer.Col_1..Caption
>>
>>This is because Col_1 is also an object inside the entire container. As soon as you type the container object name in the code window, MyContainer and a dot, the IntelliSense pops up a list of every object contained in the container including objects which are objects of other objects. You just pick the object you want and access it. Obviously if you have several "sub-"objects with the same name then you will have to use a more complete list of parent objects to reference it.
>
>I can see where this can lead to a mess if you take this shortcut for the first container you have, and then later add another container of the same class, with the same members. I guess it would either generate an error, or assign the ..caption to both. Or it would check for such a condition and warn you when you add that second container.

If you have two sub-objects with the same name and try and use this shortcut WinDev alerts you to the ambiguity created and will not compile the code. I wouldn't use this shortcut myself anyway preferring to always type the complete object hierarchy as a matter of readability.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform