XBROWSE BUGS?

XBROWSE BUGS?

Postby byte-one » Wed Dec 03, 2008 2:51 pm

1.) When MARQSTYLE_HIGHLROW, then on a database with many cols, not all cols are shown. The range from the Hscroll are OK and is also show ok! This bug are not, when bClrRowFocus is defined!!

2.) When scrolling the database, the arrow and the key "DOWN" from the vertical scrollbar has no reaction. Thumbpos are right.

3.) Method ToExcel:
When the value from first col is empty, then the value from following cols are beginning on the first col!
Also I get an error on the first call after starting the computer from this method (TOLEAuto():New( "Excel.Application" )).

Any suggestion?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby byte-one » Thu Dec 04, 2008 2:17 pm

ANTONIO, please change this code in XBROWSE.

3.) Method ToExcel:
When the value from first col is empty, then the value from following cols are beginning on the first col! Also, if CRLFs in text (M-fields) should converted with strtran to " ; " or an other character!


This could be a way:

Code: Select all  Expand view
METHOD ClpRow( lFullRow ) CLASS TXBrowse

   local nLast := Len( ::aCols )
   local n, RetVal := ""

   DEFAULT lFullRow := ( ::nMarqueeStyle >= 4 )

   if lFullRow
      for n := 1 to nLast
         if ! ::aCols[ n ]:lHide
*            if ! Empty( RetVal )
*               RetVal   += Chr( 9 )
*            endif
            RetVal += strtran(::aCols[ n ]:ClpText,CRLF," ; ") + Chr( 9 ) //changed byte-one
         endif
      next
   else
      RetVal   := strtran(::SelectedCol():ClpText,CRLF," ; ")
   endif

return RetVal


2.) When scrolling the database, the arrow and the key "DOWN" from the vertical scrollbar has no reaction. Thumbpos are right.


The ::bBof and ::bEof should redefined and not in DEFAULT! I define the xbrowse without any datatype and later i will set the datas with setRDD. But in method initiate() this codeblocks set to .T. (also eof and bof is .T.) when no datatype are defined!

Code: Select all  Expand view
METHOD SetRDD() class TXBROWSE
.
.
  DEFAULT ::bGoTop    := {|| ( ::cAlias )->( DbGoTop() ) },;
           ::bGoBottom := {|| ( ::cAlias )->( DbGoBottom() ) },;
           ::bSkip     := {| n | iif( n == nil, n := 1, ), ( ::cAlias )->( DbSkipper( n ) ) },;
           ::bBookMark := {| n | iif( n == nil,;
                                     ( ::cAlias )->( RecNo() ),;
                                     ( ::cAlias )->( DbGoto( n );
                                    ) ) }

          ::bBof      := {|| ( ::cAlias )->( Bof() ) }   //added byte-one
          ::bEof      := {|| ( ::cAlias )->( Eof() ) }   //added byte-one
.
.
Last edited by byte-one on Sat Dec 13, 2008 12:33 pm, edited 3 times in total.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby byte-one » Fri Dec 12, 2008 12:02 pm

Antonio, have you seen this points and also my private mail with other things to correcting.

Another issue:
In XBROWSE method toexcel the decimal-point with european "," are only shown, if the value > 1000.
And is it possible, write numeric datatype in oxbrw:toexcel()
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby byte-one » Sat Dec 20, 2008 10:20 am

Antonio, have you seen this points and the mail?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Antonio Linares » Sat Dec 20, 2008 10:27 am

Günther,

We are going to publish a new xbrowse version in just some days.

Our plan is to include your changes and required fixes into it, plus our own changes and enhancements.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41351
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby byte-one » Sat Dec 20, 2008 11:22 am

Thanks Antonio!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: XBROWSE BUGS?

Postby PatrickWeisser » Mon Feb 09, 2009 8:08 pm

Hello Günther,

Antonio may have fixed this by now, but the code correction I made for the ToExcel() problem that happens when the first xBrowse() column is blank is:

Code: Select all  Expand view
METHOD ClpRow( lFullRow ) CLASS TXBrowse

   local nLast := Len( ::aCols )
   local n, RetVal := ""

   DEFAULT lFullRow := ( ::nMarqueeStyle >= 4 )

   if lFullRow
      for n := 1 to nLast
         if ! ::aCols[ n ]:lHide
            RetVal += ::aCols[ n ]:ClpText  // 02/08/09, Patrick Weisser, moved up.
            if n < nLast                    // 02/08/09, Patrick Weisser, changed from: ! Empty( RetVal )
               RetVal += Chr( 9 )
            endif
         endif
      next
   else
      RetVal   := ::SelectedCol():ClpText
   endif

return RetVal



I was also getting a crash when the ToExcel() feature was used on a machine that did not have Excel installed. I'm using plain Harbour (not xHarbour) and there was no Try/Catch sequence for that case. I made the following change in the ToExcel() method:

Code: Select all  Expand view

#ifdef __XHARBOUR__

   TRY
      oExcel   := GetActiveObject( "Excel.Application" )
   CATCH
      TRY
         oExcel   := CreateObject( "Excel.Application" )
      CATCH
         MsgAlert( "Excel not installed" )
         return Self
      END
   END

#else
   TRY

      oExcel   := TOLEAuto():New( "Excel.Application" )

   CATCH

      MsgAlert( "Excel is not installed." )

      Return( NIL )

   END
#endif

User avatar
PatrickWeisser
 
Posts: 53
Joined: Fri Mar 23, 2007 4:10 am
Location: Seattle, WA, USA

Re: XBROWSE BUGS?

Postby byte-one » Tue Feb 10, 2009 12:12 am

Hello Patrick,
yes the last chr(9) are not necessary but on the last col anyhow a CRLF is given and the next full line are reading.
And you are not made the strtran() to transform CRLFs to " ; " (Memofields). If not, this makes problems!

The TRY - CATCH is super!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: XBROWSE BUGS?

Postby Antonio Linares » Tue Feb 10, 2009 7:48 pm

Patrick,

You can also have TRY ... CATCH in Harbour this way:
Code: Select all  Expand view
#ifndef __XHARBOUR__
   #xcommand TRY      => bError := errorBlock( {|oErr| break( oErr ) } ) ;;
                                 BEGIN SEQUENCE
   #xcommand CATCH [<!oErr!>] => errorBlock( bError ) ;;
                                 RECOVER [USING <oErr>] <-oErr-> ;;
                                 errorBlock( bError )
#endif
static bError
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41351
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 26 guests