Page 1 of 1

TXBrowse from resources

Posted: Wed Jul 19, 2006 5:20 pm
by Ari
[ testxbrw.prg ]

STATIC FUNCTION NewDialog( oWnd )
local oDlg, oBrw

DEFINE DIALOG oDlg RESOURCE "TEST" OF oWnd

oBrw := TXBrowse():New( oWnd ) // <<---- porque oWnd ?
// o certo deveria ser oDlg ?
oBrw:CreateFromResource( 101 )

ACTIVATE DIALOG oDlg

RETURN NIL

Re: TXBrowse from resources

Posted: Wed Jul 19, 2006 8:47 pm
by wmormar
Ari wrote:[ testxbrw.prg ]

STATIC FUNCTION NewDialog( oWnd )
local oDlg, oBrw

DEFINE DIALOG oDlg RESOURCE "TEST" OF oWnd

oBrw := TXBrowse():New( oWnd ) // <<---- porque oWnd ?
// o certo deveria ser oDlg ?
oBrw:CreateFromResource( 101 )

ACTIVATE DIALOG oDlg

RETURN NIL

Code: Select all

STATIC FUNCTION NewDialog( oWnd )
   local oDlg, oBrw

   DEFINE DIALOG oDlg RESOURCE "TEST" OF oWnd

     oBrw := TXBrowse():New( oDlg )
     oBrw:CreateFromResource( 101 )

   ACTIVATE DIALOG oDlg

RETURN NIL
Si pones oWnd, el TXBrowse se cuelga en le objeto Window, y no podria ser desde recursos, por lo tanto debe de ser oDlg, que es el objeto que contiene el dialogo TEST, donde contiene el recurso 101 TXBrowse