Hi Mark
If you want to use Scatter Name ThisForm.myProperty it works but you must include the myProperty in the form definition. It must exist as a property before you use the Scatter Name command.
I have a property I call oRecord in my base form. I then use Scatter Name ThisForm.oRecord and it works fine.
Simon
>It is often handy to use the SCATTER NAME command to scatter
>fields to an Object.
>
>However there are many occasions where I would like to add a new property(s) to the object created, but the object created has no addproperty method to cater for this.
>
>At present I do this in rather cumbersome way.
>
>ie
>
>If I need another property called Section I would do the following
>
>SELECT *,left(code,2) as section from myTable into cursor myCursor
>
>then
>
>SCATTER NAME oMyob
>
>Most of the collection objects I have looked at are a bit heavy for what I want and require the name of the field passed as a parameter to reference contents.
>
>I also dont seem to be able to do the following
>
>SCATTER NAME thisform.myproperty
>
>However I can make thisform.myproperty = to an object previously created by SCATTER NAME myObj so this is not much of a problem. GATHER NAME thisform.myproperty works fine.
>
>I have a sneaking suspicion I may be going about things the wrong way, can anyone tell me if there is an easier way of doing this sort of stuff.
Simon White
dCipher Computing