Code: Select all
#include "hmg.ch"
/***********************************/
FUNCTION Main()
/***********************************/
LOCAL oWindow
LOCAL oToolBar
LOCAL oButton1
HbQt_ErrorSys()
WITH OBJECT oWindow := Window():New()
WITH OBJECT oToolBar := ToolBar():New()
WITH OBJECT oButton1 := ToolButton():New("oButton1")
:Caption := 'Call dialog'
:OnClick := { || CallDialog() }
END WITH
END WITH
END WITH
oWindow:Activate()
RETURN NIL
/***********************************/
STATIC FUNCTION CallDialog()
/***********************************/
LOCAL oDlg
LOCAL oButtonBox
WITH OBJECT oDlg := Dialog():New( "oDlg" )
:Width := 200
:Center()
WITH OBJECT oButtonBox := ButtonBox():New("oButtonBox")
:addButton( BUTTON_OK ,, { || oDlg:Accept() } )
:addButton( BUTTON_CANCEL,, { || oDlg:Reject() } )
END WITH
END WITH
oDlg:Activate()
RETURN NIL
error within BASIC class, New() method
And I was unable to find why...