FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FW 23.07 Xbrowse, Cargos rather than Cargo
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM

FW 23.07 Xbrowse, Cargos rather than Cargo

Posted: Fri Aug 11, 2023 03:11 PM
Good evening Mr Nages,

I would like to point out a small oversight in the XBROWSE program
Cargos instead of Cargo, as noted in the code snippet below.
The version of FWH is 23.07

Thank you
Code (fw): Select all Collapse
   for nFor := 1 to Len( ::aCols )
      if ( n := AScan( aStruct, { |a| a[ 1 ] == Upper( ::aCols[ nFor ]:cHeader ) } ) ) > 0
         if Empty( ::aCols[ nFor ]:cSortOrder )
            ::aCols[ nFor ]:cSortOrder    := aStruct[ n ][ 8 ]
            ::aCols[ nFor ]:cOrdBag       := ( cAlias )->( OrdBagName( ::aCols[ nFor ]:cSortOrder ) )
         endif
      elseif ( n := AScan( aStruct, { |a| a[ 1 ] == Upper( IfNil( ::aCols[ nFor ]:Cargo, "" ) ) } ) ) > 0
         if Empty( ::aCols[ nFor ]:cSortOrder )
            ::aCols[ nFor ]:cSortOrder    := aStruct[ n ][ 8 ]
            ::aCols[ nFor ]:cOrdBag       := ( cAlias )->( OrdBagName( ::aCols[ nFor ]:cSortOrder ) )
         endif

      endif

   next nFor

   ::Cargos    := nil     <------------------------------------------------------------------------------------------------- row 5823

   DEFAULT ::bSeek  := { |c,u| ( ::cAlias )->( ::RddIncrSeek( c, @u ) ) }

   if ( ::cAlias )->( DbInfo( DBI_SHARED ) )
      if ( ::cAlias )->( RddName() ) $ "DBFNTX,DBFCDX"
         ::bLock     := { || ( ::cAlias )->( If( DbInfo( DBI_ISFLOCK ) .or. DbRecordInfo( DBRI_LOCKED, RECNO() ), ;
                              .t., lLocked := DbrLock( RECNO() ) ) ) }
         ::bUnlock   := { || If( lLocked, ( ::cAlias )->( DbrUnlock( RECNO() ) ), nil ) }
      else
         ::bLock     := { || ( ::cAlias )->( DbrLock() ) }
         ::bUnlock   := { || ( ::cAlias )->( DbrUnlock() ) }
      endif
   endif
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: FW 23.07 Xbrowse, Cargos rather than Cargo

Posted: Fri Aug 11, 2023 04:10 PM
Code (fw): Select all Collapse
::Cargos := nil
is a shortcut for
Code (fw): Select all Collapse
AEval( ::aCols, { |o| o:Cargo := nil } )
Regards



G. N. Rao.

Hyderabad, India
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM

Re: FW 23.07 Xbrowse, Cargos rather than Cargo

Posted: Fri Aug 11, 2023 05:12 PM

Hi Nages,

however, this error is generated because ::Cargos is not defined

Application

===========

Path and name: d:\Zephir\NwCoge\Sigah.exe (32 bits)

Size: *** bytes

Compiler version: Harbour 3.2.0dev (r2008190002)

FiveWin version: FWH 23.07

C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)

Windows 10 64 Bits, version: 10.0, Build 22621

Time from start: 0 hours 0 mins 15 secs

Error occurred at: 11/08/2023, 19:00:11

Error description: Error BASE/1005 Message not found: TXBROWSE:CARGOS

Stack Calls

===========

Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )

Called from: prog\xBrowse.prg => TXBROWSE:_CARGOS( 12038 )

Called from: prog\xBrowse.prg => TXBROWSE:SETRDD( 5823 )

Called from: prog\xBrowse.prg => XBRWSETDATASOURCE( 18060 )

Called from: prog\xBrowse.prg => XBROWSENEW( 17873 )

Called from: \servizio\prog\StdGes.prg => STDGES:ACTIVATE( 1728 )

Called from: prog\GesFtt.prg => GESFTT( 226 )

Called from: prog\Main.prg => (b)BUILDMENU( 6741 )

Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1557 )

Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1162 )

Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND( 272 )

Called from: => TMDIFRAME:HANDLEEVENT( 0 )

Called from: .\source\classes\WINDOW.PRG => _FWH( 3693 )

Called from: => WINRUN( 0 )

Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1118 )

Called from: prog\Main.prg => MAIN( 6404 )

System

======

CPU type: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2592 Mhz

Hardware memory: 16221 megs

Free System resources: 90 %

    GDI    resources: 90 %

    User   resources: 90 %

Windows total applications running: 4

  1 ATKOSD2,

  2 Compila, d:\Zephir\NwCoge\Sigah.exe

  3 DDE Server Window, C:\WINDOWS\System32\OLE32.DLL

  4 GDI+ Window (AsusOSD.exe), C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.1778_none_9fab56ede2916b
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: FW 23.07 Xbrowse, Cargos rather than Cargo

Posted: Fri Aug 11, 2023 06:43 PM

I see. Looks like you are creating xbrowse without any columns.

Can I see the way you are creating the xbrowse? In this case.

Please share your code. Only the part how you are creating

We will see how to handle that situation and advise.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: FW 23.07 Xbrowse, Cargos rather than Cargo

Posted: Fri Aug 11, 2023 08:20 PM
For now please make this change in your xbrowse.prg
Replace the line
Code (fw): Select all Collapse
::Cargos := nil
with
Code (fw): Select all Collapse
If !Empty( ::aCols ); ::Cargos := nil; endif
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion