FWH 10.08 TRY..CATCH xHarbour

FWH 10.08 TRY..CATCH xHarbour

Postby thefull » Thu Oct 06, 2011 9:10 am

En el fichero de fivewin.ch, es incorrecta la definición de TRY..CATCH, es más, esta 2 veces definida, la primera hace que se rompa, hay que poner un #ifndef __XHARBOUR__ o cargarselo.
Me ha costado lo mio , hasta que al alzar la vista he visto la doble definición ;-)

Supongo que está corregido en otras versiones, pero lo comento por si alguien le pasa lo mismo.


Code: Select all  Expand view
#ifdef __HARBOUR__
   #ifdef __XHARBOUR__
      #ifndef __64__
         #define FWVERSION     "FWHX 10.8"
         #define FWDESCRIPTION "FiveWin for xHarbour"
      #else
         #define FWVERSION     "FWHX64 10.8"
         #define FWDESCRIPTION "FiveWin for xHarbour 64"
      #endif
   #else
      #ifndef __64__
         #define FWVERSION     "FWH 10.8"
         #define FWDESCRIPTION "FiveWin for Harbour"
      #else
         #define FWVERSION     "FWH64 10.8"
         #define FWDESCRIPTION "FiveWin for Harbour 64"
      #endif
   #endif
   #xtranslate Browse(      => WBrowse(     // to avoid conflicts with Harbour functions
   #xtranslate SetCursor(   => WSetCursor(  // to avoid conflicts with Harbour functions
   #xtranslate __Keyboard(  => ___Keyboard( // to avoid conflicts with Harbour functions
   #xtranslate LastKey(     => _LastKey(    // to avoid conflicts with Harbour functions

   /* TRY / CATCH / FINALLY / END */
   // ESTO ROMPE XHARBOUR.. CREO QUE TENDRIA QUE ESTAR FUERA
   *        #xcommand TRY  => BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
   *        #xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
   *        #xcommand FINALLY => ALWAYS

#endif

#ifdef __FIVESCRIPT__
   #undef __HARBOUR__
#endif


#ifdef __HARBOUR__
   #ifndef __XHARBOUR__

/*      static bError
      #xcommand TRY              => bError := errorBlock( {|oErr| break( oErr ) } ) ;;
                                    BEGIN SEQUENCE
      #xcommand CATCH [<!oErr!>] => errorBlock( bError ) ;;
                                    RECOVER [USING <oErr>] <-oErr-> ;;
                                    errorBlock( bError )
*/

        #xcommand TRY  => BEGIN SEQUENCE WITH {|oErr| Break( oErr )}
        #xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
        #xcommand FINALLY => ALWAYS

        #xtranslate hb_ReadIni([<x,...>])       => hb_IniRead(<x>)
        #xtranslate HASH([<x,...>])             => hb_HASH(<x>)
        #xtranslate HGETPOS([<x,...>])          => hb_HPOS(<x>)
        #xtranslate HSET([<x,...>])             => hb_HSET(<x>)
        #xtranslate HSETCASEMATCH([<x,...>])    => hb_HSETCASEMATCH(<x>)
        #xtranslate HCLONE([<x,...>])           => hb_HCLONE(<x>)
        #xtranslate HGETKEYS([<x,...>])         => hb_HKEYS(<x>)
   #endif
#endif
 
Saludos
Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
User avatar
thefull
 
Posts: 729
Joined: Fri Oct 07, 2005 7:42 am
Location: Barcelona

Re: FWH 10.08 TRY..CATCH xHarbour

Postby Antonio Linares » Thu Oct 06, 2011 1:05 pm

Rafa,

Eso ya se corregió en su dia, en la actualidad está así:

Code: Select all  Expand view
#ifdef __HARBOUR__
   #ifndef __XHARBOUR__
      static bError
      #xcommand TRY              => bError := errorBlock( {|oErr| break( oErr ) } ) ;;
                                    BEGIN SEQUENCE
      #xcommand CATCH [<!oErr!>] => errorBlock( bError ) ;;
                                    RECOVER [USING <oErr>] <-oErr-> ;;
                                    errorBlock( bError )
   #endif
#endif


Gracias de todas formas! :-)
regards, saludos

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


Return to Bugs report & fixes / Informe de errores y arreglos

Who is online

Users browsing this forum: No registered users and 8 guests