Also error on Tplan with tdatabase

Also error on Tplan with tdatabase

Postby Silvio.Falconi » Mon Apr 05, 2021 1:56 pm

If I use tplan with tdatabase I have a error on Cargo on two methods

METHOD MoveReservation
METHOD ResizeReservation


Error

Code: Select all  Expand view  RUN
 Error description: Error BASE/1005  Variabile non disponibile: CARGO
   Args:
     [   1] = U  
     [   2] = H   {=>}

Stack Calls
===========
   Called from:  => _CARGO( 0 )
   Called from: source\booking\PBook.prg => SAMPLEPLAN:RESIZERESERVATION( 910 )
   Called from: source\booking\PBook.prg => (b)SAMPLEPLAN_BUILDPLANNING( 418 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:LBUTTONUP( 723 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:HANDLEEVENT( 619 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
   Called from: source\sistema\main.prg => TAPPLICATION:ACTIVATE( 416 )
   Called from: source\sistema\main.prg => MAIN( 65 )



I tried to insert this check before oData:Cargo = {=>} of METHOD MoveReservation or METHOD ResizeReservation

if .NOT. __objHasData(oData,"Cargo")
__objAddData( oData, "Cargo" )
ENDIF

But with this check it make me another error

Error occurred at: 05-04-2021, 15:55:59
Error description: Error BASE/3101 Parametro errato: __OBJHASDATA

Stack Calls
===========
Called from: => __ERRRT_BASE( 0 )
Called from: ../../../objfunc.prg => __OBJHASDATA( 0 )
Called from: source\booking\PBook.prg => SAMPLEPLAN:RESIZERESERVATION( 911 )



any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Also error on Tplan with tdatabase

Postby nageswaragunupudi » Mon Apr 05, 2021 3:46 pm

First, check if oData is an object or not.

If ValType( oData ) == "O"
...
else
? "odata is not object"
endif
Regards

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

Re: Also error on Tplan with tdatabase

Postby Silvio.Falconi » Mon Apr 05, 2021 4:25 pm

Nages,
I created a minimal test but I can't understand why now it doesn't make a mistake I'm going crazy because from 4 pm the error doesn't come out

Image

also I insert the check

If ValType( oData ) == "O" ....

but now nothing happens and I'm more pissed off because I don't know if I can trust and go on or give up
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Also error on Tplan with tdatabase

Postby Silvio.Falconi » Mon Apr 05, 2021 4:33 pm

Now I insert

? ValType( oData )

before of

If ValType( oData ) == "O"

oData:Cargo = {=>}
oData:Cargo['STATUS'] = nStatus
oData:Cargo['INDICE'] = ::oReserva:ROOMS_ID + DToS(::oReserva:CHECK_IN)
oPlann:oLastData = NIL

else
? "odata is not object"
endif



and it make this error ( another)

Image


I see the odatais a Object(o)

the error
Code: Select all  Expand view  RUN
Application
===========
   Path and name: C:\Work\Errori\tdatabase_Plan2\main.Exe (32 bits)
   Size: 6,460,416 bytes
   Compiler version: Harbour 3.2.0dev (r1904111533)
   FiveWin  version: FWH 21.02
   C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
   Windows version: 6.1, Build 7601 Service Pack 1

   Time from start: 0 hours 0 mins 12 secs
   Error occurred at: 05-04-2021, 18:31:27
   Error description: Error BASE/1068  Parametro errato: accesso all'array
   Args:
     [   1] = U  
     [   2] = C   STATUS

Stack Calls
===========
   Called from: Source\booking\PBook.prg => SAMPLEPLAN:COLORDATA( 696 )
   Called from: Source\booking\PBook.prg => (b)SAMPLEPLAN_BUILDPLANNING( 455 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:PAINTDATA( 1012 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:PAINTDATES( 1196 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:PAINT( 884 )
   Called from: Lib\tplan\tplan.prg => (b)TPLANNING( 127 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:DISPLAY( 0 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1793 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:HANDLEEVENT( 619 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => NMSGBOX( 0 )
   Called from: .\source\function\WQOUT.PRG => WQOUT( 12 )
   Called from: Source\booking\PBook.prg => SAMPLEPLAN:RESIZERESERVATION( 951 )
   Called from: Source\booking\PBook.prg => (b)SAMPLEPLAN_BUILDPLANNING( 455 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:LBUTTONUP( 723 )
   Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1817 )
   Called from: Lib\tplan\tplan.prg => TPLANNING:HANDLEEVENT( 619 )
   Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
   Called from:  => WINRUN( 0 )
   Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
   Called from: Source\sistema\main.prg => TAPPLICATION:ACTIVATE( 165 )
   Called from: Source\sistema\main.prg => MAIN( 33 )

System
======
   CPU type: Intel(R) Core(TM) i7 CPU       Q 740  @ 1.73GHz 1850 Mhz
   Hardware memory: 8117 megs

   Free System resources: 90 %
        GDI    resources: 90 %
        User   resources: 90 %

   Windows total applications running: 5
      1 ,                                                                                                    
      2 , C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e697
      3 , C:\Work\Errori\tdatabase_Plan2\main.Exe                                                            
      4 Alert, C:\Windows\syswow64\USER32.dll                                                                      
      5 GDI+ Window, C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c

Variables in use
================
   Procedure     Type   Value
   ==========================
   SAMPLEPLAN:COLORDATA
     Param   1:    O    Class: ERROR
   (b)SAMPLEPLAN_BUILDPLANNING
     Param   1:    O    Class: TPDATA
     Local   1:    U    
     Local   2:    U    
     Local   3:    C    "STATUS"
     Local   4:    U    
     Local   5:    U    
   TPLANNING:PAINTDATA
     Param   1:    O    Class: TPDATA
   TPLANNING:PAINTDATES
     Param   1:    N    1661014826
     Local   1:    O    Class: TPDATA
     Local   2:    H    { "20210401" => TPDATA, "20210402" => TPDATA, "20210404" => TPDATA }
     Local   3:    U    
     Local   4:    N    1
     Local   5:    N    24.17
     Local   6:    N    6
     Local   7:    N    150
     Local   8:    U    
     Local   9:    U    
     Local  10:    N    75
     Local  11:    N    411
     Local  12:    N    561
     Local  13:    A    Len:    1
     Local  14:    N    0
     Local  15:    L    .F.
     Local  16:    L    .F.
     Local  17:    U    
     Local  18:    N    0
     Local  19:    N    11
     Local  20:    H    { "lPrev" => .F., "lNext" => .F., "nColStart" => 5, "nColEnd" => 6, "nCol1" => 411, "nCol2" => 561 }
     Local  21:    U    
     Local  22:    O    Class: TPDATA
     Local  23:    N    1
   TPLANNING:PAINT
     Param   1:    N    1661014826
     Local   1:    N    11
     Local   2:    N    25
     Local   3:    N    2114982713
     Local   4:    N    0.00
     Local   5:    N    75
     Local   6:    N    936
     Local   7:    U    
     Local   8:    U    
     Local   9:    C    "Ombrellone 24"
     Local  10:    N    582
     Local  11:    N    1
     Local  12:    N    24.17
     Local  13:    U    
     Local  14:    U    
     Local  15:    U    
     Local  16:    U    
     Local  17:    U    
   (b)TPLANNING
     Local   1:    A    Len:    5
     Local   2:    A    Len:    4
     Local   3:    N    1661014826
     Local   4:    N    936
     Local   5:    N    532
   TPLANNING:DISPLAY
     Param   1:    O    Class: TPLANNING
   TCONTROL:HANDLEEVENT
   TPLANNING:HANDLEEVENT
     Param   1:    N    15
     Param   2:    N    0
     Param   3:    N    0
     Local   1:    U    
   _FWH
     Param   1:    N    15
     Param   2:    N    0
     Param   3:    N    0
   NMSGBOX
     Param   1:    N    0
     Param   2:    N    15
     Param   3:    N    0
     Param   4:    N    0
     Param   5:    N    18
     Local   1:    O    Class: TPLANNING
   WQOUT
     Param   1:    C    "
O"
   SAMPLEPLAN:RESIZERESERVATION
     Param   1:    A    Len:    1
     Local   1:    C    "
O"
   (b)SAMPLEPLAN_BUILDPLANNING
     Param   1:    O    Class: TPDATA
     Param   2:    C    "O006"
     Param   3:    O    Class: TPLANNING
     Local   1:    O    Class: TPDATA
     Local   2:    C    "silvio                        "
     Local   3:    C    "Elemento   : Ombrellone 6                  
Tipo    : 01
Numero  : O006
Settore : A
Ospite  : silvio                        
Arrivo  : 04-04-2021
Partenza    : 06-04-2021
Giorni  : 2"
     Local   4:    N    2
     Local   5:    N    2
   TPLANNING:LBUTTONUP
     Param   1:    O    Class: TPDATA
     Param   2:    C    "O006"
     Param   3:    O    Class: TPLANNING
   TCONTROL:HANDLEEVENT
     Param   1:    N    157
     Param   2:    N    556
     Param   3:    N    0
     Local   1:    C    "O006"
     Local   2:    N    6
   TPLANNING:HANDLEEVENT
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    10289708
     Local   1:    U    
   _FWH
     Param   1:    N    514
     Param   2:    N    0
     Param   3:    N    10289708
   WINRUN
     Param   1:    N    10289708
     Param   2:    N    514
     Param   3:    N    0
     Param   4:    N    10289708
     Param   5:    N    18
     Local   1:    O    Class: TPLANNING
   TWINDOW:ACTIVATE
     Param   1:    N    2491994
   TAPPLICATION:ACTIVATE
     Param   1:    C    "NORMAL"
     Param   2:    U    
     Param   3:    U    
     Param   4:    U    
     Param   5:    B    {|| ... }
     Param   6:    U    
     Param   7:    U    
     Param   8:    U    
     Param   9:    U    
     Param  10:    U    
     Param  11:    U    
     Param  12:    U    
     Param  13:    U    
     Param  14:    U    
     Param  15:    U    
     Param  16:    U    
     Param  17:    B    {|| ... }
     Param  18:    U    
     Param  19:    U    
     Param  20:    L    .F.
     Local   1:    O    Class: TWINDOW
     Local   2:    U    
     Local   3:    U    
   MAIN
     Local   1:    O    Class: TAPPLICATION

Linked RDDs
===========
   DBF
   DBFFPT
   DBFBLOB
   DBFCDX
   DBFNTX

DataBases in use
================

  1:    TDF00001                           RddName: DBFCDX
     ==============================
     RecNo    RecCount    BOF   EOF
          6          256      .F.   .F.

     Indexes in use                        TagName
        => ID                                 ROOMS_ID

     Relations in use

  2:    TDF00002                           RddName: DBFCDX
     ==============================
     RecNo    RecCount    BOF   EOF
          7           11      .F.   .F.

     Indexes in use                        TagName
        => ROOMS_ID + DToS( CHECK_IN )        ROOM_IN
           NUM                                RES_ROOM
           Upper(GUEST)                       RES_GUEST
           Upper(NUMPRE)                      RES_PRE

     Relations in use

Classes in use:
===============
     1 ERROR
     2 HBCLASS
     3 HBOBJECT
     4 TAPPLICATION
     5 TINI
     6 TFONT
     7 TWINDOW
     8 TCONTROL
     9 TICON
    10 TBRUSH
    11 TMENU
    12 TREG32
    13 TMENUITEM
    14 TMSGBAR
    15 TRECT
    16 TMSGITEM
    17 TTIMER
    18 TCURSOR
    19 TRIBBONBAR
    20 TRPANEL
    21 TRBGROUP
    22 SAMPLEPLAN
    23 TDATABASE
    24 TDIALOG
    25 TFSDI
    26 TPANEL
    27 TSPLITTER
    28 TPLANNING
    29 TSCROLLBAR
    30 TBTNBMP
    31 TCOMBOBOX
    32 TGET
    33 GET
    34 TCLIPGET
    35 TBUTTON
    36 TBUTTONBMP
    37 TRBTN
    38 TPDATA
    39 TSTRUCT

Memory Analysis
===============
      623 Static variables

   Dynamic memory consume:
      Actual  Value:    2228224 bytes
      Highest Value:    2228224 bytes








and at that line I have

METHOD ColorData( oData ) CLASS SamplePlan
local aGrad

//"Reserved", "Confirmed", "Occupied", "Calceled", "Empty"
switch oData:Cargo['STATUS']
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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