xBrowse not showing at all with MinGw and Harbour

xBrowse not showing at all with MinGw and Harbour

Postby concentra » Wed Oct 26, 2011 3:55 pm

I am triing to program a browse using xBrowse without success.
The window shows up empty with no messages at all.
I was unable to figure out what am I doing wrong...
I am using FiveWin with MinGw and Harbour.
I made a small self contained sample of what I am coding.
Could someone inspect the code above and point what's wrong ?
Code: Select all  Expand view

Function Main()

   #include "fivewin.ch"
   #include "xbrowse.ch"

   DBCREATE( "BTESTE.DBF", { { "CODIGO"    , "C", 08, 00 },;
                             { "DESCRICAO" , "C", 40, 00 } } )

   USE BTESTE.DBF EXCLUSIVE ALIAS BTESTE

   FOR I:=1 TO 200
     BTESTE->( DBAPPEND() )
     BTESTE->CODIGO     := STRZERO(I,8)
     BTESTE->DESCRICAO  := REPLICATE("X",MOD(I,39)+1)
   NEXT

   BTESTE -> ( DBGOTOP() )

   oDLG := TWINDOW():NEW( 0, 0, 50, 100 ,"xBrowse Test" )

   @ 0,0 XBROWSE oBRW ALIAS "BTESTE" OF oDLG

   ADD COLUMN TO oBRW TITLE "CODIGO"    DATA BTESTE->CODIGO    SIZE  80
   ADD COLUMN TO oBRW TITLE "DESCRICAO" DATA BTESTE->DESCRICAO SIZE 320

   ACTIVATE WINDOW oDLG

   CLOSE DATABASES

RETURN
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: xBrowse not showing at all with MinGw and Harbour

Postby anserkk » Thu Oct 27, 2011 4:41 am

You missed the code :)

Code: Select all  Expand view
oBrw:CreateFromCode()


Code: Select all  Expand view
#include "fivewin.ch"
#include "xbrowse.ch"
Function Main()
   DBCREATE( "BTESTE.DBF", { { "CODIGO"    , "C", 08, 00 },;
                             { "DESCRICAO" , "C", 40, 00 } } )

   USE BTESTE.DBF EXCLUSIVE ALIAS BTESTE

   FOR I:=1 TO 200
     BTESTE->( DBAPPEND() )
     BTESTE->CODIGO     := STRZERO(I,8)
     BTESTE->DESCRICAO  := REPLICATE("X",MOD(I,39)+1)
   NEXT

   BTESTE -> ( DBGOTOP() )

   oDLG := TWINDOW():NEW( 0, 0, 50, 100 ,"xBrowse Test" )

   @ 0,0 XBROWSE oBRW ALIAS "BTESTE" OF oDLG SIZE 0,0

   ADD COLUMN TO oBRW TITLE "CODIGO"    DATA BTESTE->CODIGO    SIZE  80
   ADD COLUMN TO oBRW TITLE "DESCRICAO" DATA BTESTE->DESCRICAO SIZE 320
   
   oBrw:CreateFromCode()

   ACTIVATE WINDOW oDLG

   CLOSE DATABASES

RETURN

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: xBrowse not showing at all with MinGw and Harbour

Postby concentra » Thu Oct 27, 2011 9:11 am

Very thanks Anser !
Thats it.
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 101 guests