Mystery with SEQUENCE

Mystery with SEQUENCE

Postby Jimmy » Wed Mar 01, 2023 11:05 am

hi,

i have many Place where it work but 2 place where "something" is going wrong ... but NO Error recorded :!:
it is a Visual "Problem" which it got when try below CODE

Code: Select all  Expand view  RUN
STATIC PROCEDURE NewActiveIcon( oTab, nTabs )
LOCAL ii, iMax
LOCAL nOption
LOCAL bSaveError, oError

   IF oTab:IsKindOf( "TFOLDEREX" )

* #define Use_SEQUENCE
#ifdef Use_SEQUENCE
      bSaveError := ERRORBLOCK()
      ERRORBLOCK( { | e | BREAK( e ) } )
      BEGIN SEQUENCE
#endif

      nOption := oTab:nOption
      FOR ii := 1 TO nTabs
         if ii = nOption
           oTab:SetBitmap( "MYGREEN", nOption )
         else
           oTab:SetBitmap( "MYTRANSPARENT", ii )
         endif
*         fwlog ii
*         SysRefresh()
      NEXT

#ifdef Use_SEQUENCE
      RECOVER USING oError
         ERRORBLOCK( bSaveError )
         fwlog oError:description, oError:operation, oError:osCode
      END SEQUENCE
      ERRORBLOCK( bSaveError )
#endif

   ENDIF

RETURN


---

1st "Problem" was CODE to show Item of does not appear ...
but it was in my CLASS so may some Side-Effect

now 2nd "Problem" is where i set Bitmap for TAB-Header in STATIC FUNCTION which is in MAIN.PRG
it does contain only Fivewin Method "SetBitmap()" of TFOLDEREX and not my CLASS

i don´t understand why CODE work not as expect when use ERRORBLOCK / SEQUENCE
is my CODE Syntax wrong for Fivewin :?:

will try to make a Sample

---

edit : when try to make Sample i recognize i mean Hilight-Bar of TGrid "lost" Color, not TAB-Header
so Sample must be full Release ... work on it
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Mystery with SEQUENCE

Postby Jimmy » Thu Mar 02, 2023 10:08 am

have found out what SEQUENCE made

it does "detect" by SEQUENCE, in a Called Method, but it work (!) without SEQUENCE :o
NOSPLASH( 1621 ) oError:description = "Zero divisor" oError:operation = "%" oError:osCode = 0

Code: Select all  Expand view  RUN
     oTab_Right:SetFocus()
      oExpl_Right:oParent := oMain
      oExpl_Right:FillGrid( F_NAME, oMain )

i have no "%" in this Modul but in called Method FillGrid() where it "crash" ... but still run (without SEQUENCE )

so i got Solution for one Mystery

but why using SEQUENCE in other Function "block" Color of "highlicht-Bar" ... there is no Errorlog ... hm

---

"other" have to do with "ReadImage"
it seems there are File where "something" go wrong and Crash

it have to do with
FWDELRESOURCE(36) in .\source\function\CHECKRES.PRG

Called from: .\source\function\CHECKRES.PRG => (b)FWDELRESOURCE( 36 )
Called from: => ASCAN( 0 )
Called from: .\source\function\CHECKRES.PRG => FWDELRESOURCE( 36 )
Called from: => DELETEOBJECT( 0 )
Called from: .\source\classes\BITMAP.PRG => PALBMPFREE( 1180 )
Called from: .\source\classes\BITMAP.PRG => TBITMAP:DESTROY( 498 )
Called from: .\source\classes\BITMAP.PRG => (b)TBITMAP( 89 )
Called from: .\source\classes\BITMAP.PRG => TBITMAP:END( 0 )

Called from: .\DUALGRID.PRG => DOSPLASH( 1680 )
Called from: .\DUALGRID.PRG => (b)MAIN( 836 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1100 )
Called from: .\DUALGRID.PRG => MAIN( 836 )

but when start again, or /S ingle-Mode, it (most) work ... hm ...


btw. in "link" BAT / MAK / HBP often Option "/L" is used
but than you get no "Line-Number" in Errorlog :!:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

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