Paul,
Mistake in your coding in that you don’t pass the "init() parameter" as a
string

Also you can use non modal forms to do the same thing - just as an aside -
see below!

* Returning data back from a non modal form
*
? Create_Form("Hello")

***********
* Create the Form and return Back Values
*
Procedure Create_Form(pcVar)
Local o
Local lnRetVal

  o = CREATEOBJECT("MyForm", pcVar) 
  o.Show(2)

  Do While .t.
    DoEvents
    Wait Window Nowait Noclear o.nStatus
    If o.nStatus=-1
      lnRetval=o.cRetvar
      Release o
      exit
    Endif
  Enddo
  *
Return lnRetVal


************
* Form Class
*
DEFINE CLASS MyForm AS Form 
Add Object btnClose as CommandButton

  cRetVar = 0
  nStatus=0
   
  PROCEDURE Init()
  PARAMETERS tcRetVar
    This.btnClose.Caption="Close"
    =BindEvent(This.btnClose,"Click",This, "SomeProcThatSetsTheReturnValue")
        
    THIS.cRetVar = tcRetVar
  ENDPROC
   
  PROCEDURE SomeProcThatSetsTheReturnValue
    This.cRetVar="Hello Modified"
    STORE -1 TO THISFORM.nStatus
  ENDPROC
  *
ENDDEFINE

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.13.23/513 - Release Date: 02/11/2006
07:40
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to