Versions des environnements
>>>* Possibly hard-to-debug bugs where WITH context gets carried into called function/procedure/PRG.
>>>
>>>Kind'a too bad really -- WITH comes in handy when you're accessing properties/methods of an object that's nested deeply (e.g. textbox within a cell within a column of a grid within a container within a page of a pageframe within a page of a pageframe in a form). Intent of the code is much clearer than repeatedly referring to the deeply-nested object.
>>
>>Assigning a temporary object reference gives you clarity and speed - especially when activeX-access is involved.
>
>Of course one needs to be very careful about variable reuse in the cases where you would've had more than one WITH..ENDWITH in effect.
As the effects are more marked in the inner loops, it is often only necessary to hoist long
property walking statemets once ore twice out of the innermost loops. Add that with
descriptive temp names (loTempDoc, loTempRow instead of lo1, lo2) and you are set.
HTH
thomas
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement