BUG: error in Invoices.prg sample

BUG: error in Invoices.prg sample

Postby mgsoft » Fri Oct 29, 2010 2:43 pm

Hi,

I compile the sample and I click on the menu items (archivo, edición, etc) and the program crashes.

Any clue?

Thank you :D
Last edited by mgsoft on Wed Mar 16, 2011 3:36 pm, edited 1 time in total.
Saludos,

Eduardo
User avatar
mgsoft
 
Posts: 422
Joined: Mon Aug 17, 2009 12:18 pm
Location: España

Re: error in Invoices.prg sample

Postby ukservice » Sun Oct 31, 2010 10:26 am

Yes, I confirm this problem
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: error in Invoices.prg sample

Postby James Bott » Mon Nov 01, 2010 6:41 pm

This is probably because there are no actions defined for the menu items. It is just a dummy menu.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: error in Invoices.prg sample

Postby mgsoft » Mon Nov 01, 2010 6:59 pm

James,

I created a full menu with items and actions and the error happen too;)
Saludos,

Eduardo
User avatar
mgsoft
 
Posts: 422
Joined: Mon Aug 17, 2009 12:18 pm
Location: España

Re: error in Invoices.prg sample

Postby James Bott » Mon Nov 01, 2010 8:46 pm

Mgsoft,

What is the error?
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: error in Invoices.prg sample

Postby James Bott » Mon Nov 01, 2010 8:58 pm

OK, I see that it is an unknown error generated by Windows.

I made a simiple test and it runs without error, so there is something different with invoices.prg.

James

Test program:

Code: Select all  Expand view
// Test dummy menu erroring out


#include "fivewin.ch"

function main()

   TApplication():new()

return nil

class TApplication
   data oMenu
   method new()
   method buildMenu()
endclass

method new() CLASS TApplication
   local oWnd
   define window oWnd menu ::BuildMenu()
   activate window oWnd
return nil

//----------------------------------------------------------------------------//

METHOD BuildMenu() CLASS TApplication

   MENU ::oMenu 2007
      MENUITEM "&Archivo"
      MENUITEM "&Edición"
      MENUITEM "&Ver"
      MENUITEM "&Datos"
      MENUITEM "&Procesos"
   ENDMENU

return ::oMenu  
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: error in Invoices.prg sample

Postby mgsoft » Wed Mar 16, 2011 3:35 pm

Hi,

Any clue on this bug?

Thank you.
Saludos,

Eduardo
User avatar
mgsoft
 
Posts: 422
Joined: Mon Aug 17, 2009 12:18 pm
Location: España

Re: BUG: error in Invoices.prg sample

Postby Daniel Garcia-Gil » Wed Mar 16, 2011 11:02 pm

Hello...

mgsoft wrote:Any clue on this bug?
Thank you.


i thinks is not a bug... maybe a incompatibility in MDI enviroment

this a same sample using panel
Code: Select all  Expand view

// Demo of a Menu + ButtonBar + ExplorerBar + Splitter + Titles + Browses

#include "FiveWin.ch"
#include "Splitter.ch"
#include "TTitle.ch"
#include "xbrowse.ch"

//----------------------------------------------------------------------------//

function Main()

   local oApp := TApplication():New()
   
   oApp:Run()
   
return nil  

//----------------------------------------------------------------------------//

CLASS TApplication

   DATA   oWndMain, oMenu, oExBar, oSplit
   DATA   oWndBrief
   
   METHOD New()
   METHOD BuildMenu()
   METHOD BuildButtonBar()
   METHOD BuildExplorerBar()
   METHOD Run()
   
ENDCLASS

//----------------------------------------------------------------------------//

METHOD New() CLASS TApplication

   DEFINE WINDOW ::oWndMain TITLE "Facturación";
      MENU ::BuildMenu() COLOR "N/W*"
     
   ::BuildButtonBar()
   ::BuildExplorerBar()

   ::oWndBrief = TWndBrief():New( ::oWndMain )


   @ 0, 800 SPLITTER ::oSplit ;
      VERTICAL _3DLOOK ;  
      PREVIOUS CONTROLS ::oWndBrief:oWnd;
      HINDS CONTROLS ::oExBar ;
      SIZE 4, ::oWndMain:nHeight - 70 PIXEL ;
      OF ::oWndMain


   SET MESSAGE OF ::oWndMain ;
      TO "Demo of a Menu + ButtonBar + ExplorerBar + Splitter + Titles + Browses" ;
      CENTERED CLOCK KEYBOARD 2007
         
return Self

//----------------------------------------------------------------------------//

METHOD Run() CLASS TApplication

   ACTIVATE WINDOW ::oWndMain MAXIMIZED ;
      ON RESIZE ::oSplit:Adjust()

return nil

//----------------------------------------------------------------------------//

METHOD BuildMenu() CLASS TApplication

   MENU ::oMenu 2007
      MENUITEM "&Archivo"
      MENUITEM "&Edición"
      MENUITEM "&Ver"
      MENUITEM "&Datos"
      MENUITEM "&Procesos"
      MENUITEM "&Impresiones"
      MENUITEM "&Herramientas"
      MENUITEM "Inte&rnet"
      MENUITEM "&Ventanas"
      MENUITEM "&?"
   ENDMENU
   
return ::oMenu      

//----------------------------------------------------------------------------//

METHOD BuildButtonBar() CLASS TApplication

   local oBar

   DEFINE BUTTONBAR oBar OF ::oWndMain SIZE 125, 60 2007

   DEFINE BUTTON OF oBar ACTION MsgInfo( "presupuesto" ) ;
      FILENAME "..\bitmaps\32x32\case.bmp" PROMPT "Nuevo presupuesto" TOOLTIP "Attach"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "factura" ) ;
      FILENAME "..\bitmaps\32x32\graphics.bmp" PROMPT "Nueva factura" TOOLTIP "Calendar"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "venta" ) ;
      FILENAME "..\bitmaps\32x32\edit.bmp" PROMPT "Documentos de venta" TOOLTIP "Calendar"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "compra" ) ;
      FILENAME "..\bitmaps\32x32\new.bmp" PROMPT "Documentos de compra" TOOLTIP "Calendar"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "stock" ) GROUP ;
      FILENAME "..\bitmaps\32x32\graphics.bmp" PROMPT "Documentos de stock" ;
      TOOLTIP "Calendar"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "cobros" ) GROUP ;
      FILENAME "..\bitmaps\32x32\case.bmp" PROMPT "Cobros" TOOLTIP "Calendar"
     
   DEFINE BUTTON OF oBar ACTION MsgInfo( "clientes" ) GROUP ;
      FILENAME "..\bitmaps\32x32\people.bmp" PROMPT "Clientes y clientes potenciales" ;
      TOOLTIP "Clientes"

   DEFINE BUTTON OF oBar ACTION MsgInfo( "articulos" ) GROUP ;
      FILENAME "..\bitmaps\32x32\edit.bmp" PROMPT "Artículos" TOOLTIP "Calendar"

return oBar

//----------------------------------------------------------------------------//

METHOD BuildExplorerBar() CLASS TApplication

   local oPanel1, oPanel2, oPanel3, oPanel4
   local bClick

   @ 0, 805 EXPLORERBAR ::oExBar OF ::oWndMain SIZE 200, 400

   oPanel1 = ::oExBar:AddPanel( "One", "..\bitmaps\32x32\people.bmp" )
   oPanel1:lSpecial = .T.
   oPanel1:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel1:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )
     
   oPanel2 = ::oExBar:AddPanel( "Two", "..\bitmaps\32x32\case.bmp" )
   oPanel2:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel2:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel2:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   oPanel2:AddLink( "Fourth item", bClick, "..\bitmaps\16x16\copy.bmp" )

   oPanel3 = ::oExBar:AddPanel( "Three", "..\bitmaps\32x32\graphics.bmp" )
   oPanel3:AddLink( "First item", bClick, "..\bitmaps\16x16\adddbf.bmp" )
   oPanel3:AddLink( "Second item", bClick, "..\bitmaps\16x16\delete0.bmp" )
   oPanel3:AddLink( "Third item", bClick, "..\bitmaps\16x16\envelope.bmp" )
   
   oPanel4 = ::oExBar:AddPanel( "Four" )
   oPanel4:AddLink( "First item", bClick, "..\bitmaps\16x16\additem.bmp" )
   oPanel4:AddLink( "Second item", bClick, "..\bitmaps\16x16\copy.bmp" )

   
return ::oExBar

//----------------------------------------------------------------------------//

CLASS TWndBrief

   DATA   oWnd

   METHOD New( oWndMain )
   METHOD BuildTitles()
   METHOD BuildBrowses()
   
ENDCLASS      
   
//----------------------------------------------------------------------------//

METHOD New( oWndMain ) CLASS TWndBrief
         

   ::oWnd = TPanel():New( 60, 0, 400, 800, oWndMain )

   ::BuildTitles()
   ::BuildBrowses()

   
return self

//----------------------------------------------------------------------------//

METHOD BuildTitles() CLASS TWndBrief

   local oTitle1, oTitle2, oTitle3, oTitle4, oTitle5, oTitle6, oTitle7, oFont1

   DEFINE FONT oFont1 NAME "Blackoak Std" SIZE 0, -20

   @ 0, 0 TITLE oTitle1 SIZE 800, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle1:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 10 TITLETEXT OF oTitle1 TEXT "Panel de resumen" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 777 TITLEIMG OF oTitle1 BITMAP "..\bitmaps\16X16\close.bmp" TRANSPARENT  
     
   @ 60, 10 TITLE oTitle2 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle2:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle2 TEXT "Últimos Documentos de venta" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle2 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

   @ 60, 410 TITLE oTitle3 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle3:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle3 TEXT "Seguimiento Presupuesto" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle3 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

   @ 250, 10 TITLE oTitle4 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle4:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle4 TEXT "Vencimientos impagados" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle4 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

   @ 250, 410 TITLE oTitle5 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle5:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle5 TEXT "Estadísticas de venta" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle5 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

   @ 440, 10 TITLE oTitle6 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle6:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle6 TEXT "Ultimos documentos de compra" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle6 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

   @ 440, 410 TITLE oTitle7 SIZE 385, 30 OF ::oWnd SHADOWSIZE 0
   
   oTitle7:aGrdBack = { { 1, nRGB( 87, 130, 199 ), nRGB( 25, 69, 159 ) } }
   
   @ 5, 35 TITLETEXT OF oTitle7 TEXT "Estadísticas de compra" FONT oFont1 ;
      COLOR nRGB( 255, 255, 255 )

   @ 8, 8 TITLEIMG OF oTitle7 BITMAP "..\bitmaps\16X16\favorite.bmp" TRANSPARENT  

return nil

//----------------------------------------------------------------------------//

METHOD BuildBrowses() CLASS TWndBrief

   local oBrw1, oBrw2, oBrw3, oBrw4, oBrw5, oBrw6

   USE Customer ALIAS "One" SHARED
   
   @ 90, 10 XBROWSE oBrw1 FIELDS One->First, One->Last ;
      SIZE 385, 155 OF ::oWnd PIXEL ALIAS "One"
     
   oBrw1:CreateFromCode()  

   USE Customer NEW ALIAS "Two" SHARED
   
   @ 90, 410 XBROWSE oBrw2 FIELDS Two->First, Two->Last ;
      SIZE 385, 155 OF ::oWnd PIXEL ALIAS "Two"
     
   oBrw2:CreateFromCode()  

   USE Customer NEW ALIAS "Three" SHARED
   
   @ 280, 10 XBROWSE oBrw3 FIELDS Three->First, Three->Last ;
      SIZE 385, 155 OF ::oWnd PIXEL ALIAS "Three"
     
   oBrw3:CreateFromCode()  

   USE Customer NEW ALIAS "Four" SHARED
   
   @ 280, 410 XBROWSE oBrw4 FIELDS Four->First, Four->Last ;
      SIZE 385, 155 OF ::oWnd PIXEL ALIAS "Four"
     
   oBrw4:CreateFromCode()  

   USE Customer NEW ALIAS "Five" SHARED
   
   @ 470, 10 XBROWSE oBrw5 FIELDS Five->First, Five->Last ;
      SIZE 385, 140 OF ::oWnd PIXEL ALIAS "Five"
     
   oBrw5:CreateFromCode()  

   USE Customer NEW ALIAS "Six" SHARED
   
   @ 470, 410 XBROWSE oBrw6 FIELDS Six->First, Six->Last ;
      SIZE 385, 140 OF ::oWnd PIXEL ALIAS "Six"
     
   oBrw6:CreateFromCode()  

return nil

//----------------------------------------------------------------------------//
 
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 53 guests