Do Form TestForm With (cText)>A my collegue founds something that sounds like a Bug!
>Return >Function Main() > Public oApp as C_App > > oApp = CreateObject('C_App') > > Local oForm As Form > > If File('TestForm.Scx') && Clean directory from files of previous tests > Delete File TestForm*.* > EndIf > > Local cText > cText = 'test Parameter' > > ** This Works Correctly > oForm = CreateObject('MyForm', cText) > ** Create the external form > oForm.SaveAs("TestForm.Scx") > oForm.Release() > > ** This Works Correctly > oForm = CreateObject('MyForm_NoParameters') > ** Create the external form > oForm.SaveAs("TestForm_NoParam.Scx") > oForm.Release() > > ** This Works > Do Form TestForm_NoParam > > ** This Don't Works ... Why ? > ** Emits an Error: Function argument value, type, or count is invalid. > Do Form TestForm With cText > > >EndFunc > >Define Class MyForm As Form > > Function Load() > oApp.OnFormLoad(This) > EndFunc > > Function Init(cText) > MessageBox(cText) > EndFunc > >Enddef > >Define Class MyForm_NoParameters As Form > > Function Load() > oApp.OnFormLoad(This) > EndFunc > > Function Init() > MessageBox('No Parameters') > EndFunc > >Enddef > > >Define Class C_App as Custom > > Function OnFormLoad(oForm as Form) > BindEvent(oForm, 'Init', This, 'OnFormInit', 1) > EndFunc > > Function OnFormInit(cText) > MessageBox('Delegate OnFormInit') > EndFunc > >EndDefine