Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WITH object
Message
 
À
14/11/2019 15:12:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01671871
Message ID:
01671885
Vues:
81
>I haven't tested, but would like to know what This is inside a With-Endwith construct. IOW

THIS will still be scoped as it would be outside of the WITH statement - ie. scoped to the parent class that contains this code.

+++ Rick ---

>
>
WITH xyz.abc
>    SomeFunction(this, 1, 2)
>ENDWITH
>
>>The equivalent of:
>>
WITH xyz.abc
>>    SomeFunction(xyz.abc, 1, 2)
>>ENDWITH
>>
>>But without having to retype "xyz.abc" by being able to use something like "." which works without syntax error, by the way, but doesn't pass anything in.
>>
>>
WITH xyz.abc
>>    SomeFunction(.)
>>    SomeFunction(@.)
>>ENDWITH
>>
>>Both of those compile without error, but don't pass in any reference. It's as though you used SomeFunction() with zero parameters as PCOUNT() reports 0.
>>
>>
WITH xyz.abc
>>    SomeFunction(., 1, 2)
>>    SomeFunction(@., 1, 2)
>>ENDWITH
>>
>>But neither of those work. Both generate an error.
>>
>>>I'm not sure what you want but:
>>>
>>>WITH xyz.abc
>>>    SomeFunction(.Width, 1, 2)
>>>ENDWITH
>>>
>>>
>>>>Is there a way to access the WITH object here without re-typing it?
>>>>
>>>>Something like:
>>>>
WITH xyz.abc
>>>>
>>>>    SomeFunction(thisWith, 1, 2)
>>>>
>>>>ENDWITH
>>>>
>>>>
>>>>
>>>>FUNCTION SomeFunction
>>>>LPARAMETERS toWith, tnRow, tnCol
>>>>
>>>>    ? (toWith == xyz.abc)
>>>>    * Displays .T.
>>>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform