See Q156506, there was a thread about a similar problem a couple of weeks ago, try searching for the ID number.
"A code snippet exported by the Class Browser generates a syntax error if the
code uses the ADD OBJECT command to add an object to a container object in a
class. It appears that the Class Browser exported the code incorrectly. In fact,
Visual FoxPro has a language limitation that does not allow the ADD OBJECT
command to add an object to a container object in a class definition.
CAUSE
=====
Even though the Class Browser cannot produce actual working code in this
situation, it documents the intent of the class rather than omit the code
altogether."
Len Speed