>>The scope of a NAME name is Private, so it's generally both practical and OOPish to do things that way.
>
>Bruce,
>
>Using a private variable may be encapsulated to a certain degree, however there is absolutely nothing OOPish about it. OOP doesn't want any variables floating around in memory, it wants everything connected to an object somewhere as a property.
Jim, I was just illustrating that the scope of whatever "variable" is placed in the NAME clause is treated as private in scope. It is not necessary to declare these NAME clause parameters (they are implicit), unless they're properties. For example
DO FORM etc NAME oSomething && similar to private var, but not declared
or
DO FORM etc NAME thisform.oChild && from TL form-managing method
Whatever is placed after NAME is private in scope...obviously, the second one is more OOPish than the first. The only time I actually use anything other than a form property is for a top-level launch in the main PRG, e.g.,
DO FORM mytoplevel NAME oTopform
READ EVENTS
oTopform is private, but global in nature due to its location in the main PRG. This requires no Public declaration, so might be considered a slight step ahead of an application object in that respect.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.