EnricoMaria wrote:- Code: Select all Expand view
#INCLUDE "FIVEWIN.CH"
PROCEDURE MAIN()
LOCAL oDLG_MAIN := TWINDOW():NEW(,,,,"Test"), oMessage
ACTIVATE WINDOW oDLG_MAIN ON INIT( TEST2() )
RETURN
FUNCTION TEST2()
LOCAL oDialog, oMessage
DEFINE DIALOG oDialog TITLE "Test2"
//DEFINE MESSAGE oMessage OF oDialog PROMPT "Test2 Footer"
ACTIVATE DIALOG oDialog ON INIT TEST3( oDialog )
RETURN NIL
FUNCTION TEST3( oDialog )
LOCAL oMessage
DEFINE MESSAGE oMessage OF oDialog PROMPT "Test2 Footer"
RETURN NIL
EMG
Ok, it works.
But, why can´t I do the previous code ?
If I program a WINDOW other than a DIALOG, the code works OK, like:
- Code: Select all Expand view
DEFINE WINDOW oDialog TITLE "Test2"
DEFINE MESSAGE oMessage OF oDialog PROMPT "Test2 Footer"
ACTIVATE DIALOG oDialog ON INIT TEST3( oDialog )
Why can I do this with a WINDOW and not with a DIALOG ?
Isn´t a DIALOG a WINDOW sub-class ?
It can seems to be a stupid question, but, I am just triing to understand...