>>>* 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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only