See mskb #
Q156506 for explanation.
>Hi,
>
>Here's my problem:
>
>I created a class by designing a form and then using the "save as class" option. I now have a .vcx that defines my form. My form is a basic form with a pageframe that only has one button on the first page. If I do the following, everything works fine (testgen is the only class in test.vcx and it's my form):
>
>
>SET CLASSLIB TO "test.vcx"
>PUBLIC oForm
>oForm = CREATEOBJECT("testgen")
>oForm.Show()
>
>
>Problem is, if I take the code of the class (using the class browser) and copy-paste it in a .prg file, I get a syntax error!
>
>Here's the code of the class:
>
>
>DEFINE CLASS testgen AS form
>
>
> DoCreate = .T.
> Caption = "Form1"
> Name = "Form1"
>
>
> ADD OBJECT pageframe1 AS pageframe WITH ;
> ErasePage = .T., ;
> PageCount = 2, ;
> Top = 10, ;
> Left = 10, ;
> Width = 351, ;
> Height = 235, ;
> Name = "Pageframe1", ;
> Page1.Caption = "Page1", ;
> Page1.Name = "Page1", ;
> Page2.Caption = "Page2", ;
> Page2.Name = "Page2"
>
>
> ADD OBJECT testgen.pageframe1.page1.command1 AS commandbutton WITH ;
> Top = 62, ;
> Left = 84, ;
> Height = 36, ;
> Width = 166, ;
> Caption = "Command1", ;
> Name = "Command1"
>
>
>ENDDEFINE
>
>
>The syntax error occurs at the "ADD OBJECT testgen.pageframe1.page1.command1..." line.
>
>What is wrong here?
>
>Thanks a lot, Stephane.
--sb--