John,
Use amembers() to enumerate the properties. You can build a string into _cliptext and paste it in your code.
function ObjectToCode1( lcObjectName )
loObject = eval( lcObjectName )
if ( vartype( loObject ) = 'O' )
_cliptext = ""
n = amembers( laProperties, loObject )
for i = 1 to n
_cliptext = _cliptext + lcObjectName + "." + laProperties[i] + " = " + chr(13) + chr(10)
endfor
endif
return
scatter name oX
ObjectToCode1( "oX" )
>Does anyone know of a method to easily generate object definition code based on an object generated by SCATTER NAME?
>
>Quite simply, I'd like to drop whatever property names and values contained in the object directly into my code for easy reference and manuipulation:
>
>oThing.FirstProperty='Fruit'
>oThing.SecondProperty='Apple'
>oThing.ThirdProperty='Red'