>
>loCustomerRec = createobject("recno('customer')")
>select customer
>scan
> select invoice
> loInvoiceRec = createobject("recno('invoice')")
> scan
> ?invoice.num
> endscan
>endscan
>
>When this method ends, loInvoiceRec would be destroyed first, then loCustomerRec.
Mike,
How would you create an object out of a class named "recno('customer')" ?
Though I get the idea, I would be very carefull with relying on functionality bound to implicit the destroy of an object. It generally is hard to follow and harder to debug. What would happen if the variable is not declared local (as in your example above), or even more sneaky, if you have a spelling mistake in the variable name when you assign or declare it and such variable exists already as a private (e.g. Due to recursive calls).
IMO, It would make more sense to just restore it explicitely.
Walter,