TBAR ON A DIALOG ERROR ????

TBAR ON A DIALOG ERROR ????

Postby Silvio » Mon Mar 01, 2010 5:13 pm

i TRY THIS LITTLE TEST


Code: Select all  Expand view
#include "FiveWin.ch"



#define Badge0001 ".\modelli\badge000.bmp"



static oBack,oDlg ,oRBar

Function test()


DEFINE DIALOG oDlg  FROM 317, 412 TO 730, 832 PIXEL
@ 2, 0 BITMAP oBack  filename Badge0001    ADJUST

ACTIVATE DIALOG oDlg;
ON PAINT Bardialog()

return nil


Function Bardialog()

    DEFINE BUTTONBAR oRBar  SIZE 25, 25 OF oDlg   2007
return nil




IT MAKE ERROR
Application
===========
Path and name: C:\tessera\test.Exe (32 bits)
Size: 1,858,560 bytes
Time from start: 0 hours 1 mins 22 secs
Error occurred at: 03/03/10, 18:12:33
Error description: Error BASE/1004 Class: 'NIL' has no exported method: GETCLIRECT
Args:
[ 1] = U

Stack Calls
===========
Called from: => GETCLIRECT(0)
Called from: .\source\classes\BAR.PRG => TBAR:NEW(85)
Called from: test3.prg => BARDIALOG(25)
Called from: test3.prg => (b)TEST(18)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:PAINT(853)
Called from: .\source\classes\DIALOG.PRG => (b)TDIALOG:TDIALOG(86)
Called from: => TDIALOG:DISPLAY(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT(915)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(343)
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
Called from: => GETCLIRECT(0)
Called from: .\source\classes\BAR.PRG => TBAR:NEW(85)
Called from: test3.prg => BARDIALOG(25)
Called from: test3.prg => (b)TEST(18)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:PAINT(853)



i TRYED ALSO WITH
ON INIT Bardialog()

WHY IT MAKE ERROR ?
Last edited by Silvio on Tue Mar 02, 2010 7:49 am, edited 1 time in total.
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: TBAR ON A DIALOG ERROR ????

Postby nageswaragunupudi » Mon Mar 01, 2010 5:30 pm

You can easily see from the error log that the value of oDlg inside the BarDialog function is NIL. Therefore the error.

...
ON INIT BarDialog( oDlg )
and
function BarDialog( oDlg )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10627
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: TBAR ON A DIALOG ERROR ????

Postby Silvio » Tue Mar 02, 2010 7:48 am

Nages
I insert odlg on STATIC
I know if a variable is Static it can be take from each function , isn'it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: TBAR ON A DIALOG ERROR ????

Postby jll-fwh » Tue Mar 02, 2010 2:49 pm

Hola;


ON INIT FrameBar( oDlg )


/*------------------------------------------------------------------------------*/
Function FrameBar( oWnd )
/*------------------------------------------------------------------------------*/
LOCAL oCursor, nFor

DEFINE CURSOR oCursor HAND

DEFINE BUTTONBAR oBar _3D SIZE 45, 45 OF oWnd

DEFINE BUTTON RESOURCE "MenuP_Tablas" OF oBar NOBORDER;
TOOLTIP "Tablas";
MENU BuildPopup()

DEFINE BUTTON RESOURCE "MenuP_Indexar" OF oBar NOBORDER;
TOOLTIP "Ordena Bases de Datos";
ACTION ( CreaIndices( oWnd ) )

DEFINE BUTTON RESOURCE "BotonSalir" OF oBar NOBORDER;
TOOLTIP "Salir del Programa" ACTION Salir()

oBar:bRClicked := {|| NIL }
oWnd:lBalloon := .T.

FOR nFor := 1 TO len(oBar:aControls)
oBar:aControls[nFor]:oCursor := oCursor
SysRefresh()
NEXT

Return( oBar )


Un saludo
JLL
Libreria: FWH/FWH1109 + Harbour 5.8.2 + Borland C++ 5.8.2
Editor de Recursos: PellecC
ADA, OURXDBU
S.O: XP / Win 7 /Win10
Blog: http://javierlloris.blogspot.com.es/
e-mail: javierllorisprogramador@gmail.com
User avatar
jll-fwh
 
Posts: 408
Joined: Fri Jan 29, 2010 8:14 pm
Location: Meliana - Valencia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 80 guests