FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos DEFINE MESSAGE BAR is pre-processed incorrectly?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
DEFINE MESSAGE BAR is pre-processed incorrectly?
Posted: Thu Oct 13, 2011 09:31 AM
The command 'DEFINE MESSAGE BAR of oWnd prompt "ABC" ' seems to be pre-processed into:
Code (fw): Select all Collapse
BAR:= oWnd:oMsgBar := TMsgBar():New( oWnd, "ABC", .F., .F., .F., .F.,,,,, .F., if( .F., .F., .F. ) )

instead of
Code (fw): Select all Collapse
oWnd:oMsgBar := TMsgBar():New( oWnd, "ABC", .F., .F., .F., .F.,,,,, .F., if( .F., .F., .F. ) )


This caused a warning messsage during compilation, Warning W0001 Ambiguous reference 'BAR'

Tested with Harbour+FWH11.8

Is this a bug or I did something wrong?
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: DEFINE MESSAGE BAR is pre-processed incorrectly?
Posted: Thu Oct 13, 2011 10:46 AM
Hua,

This fix is required in FiveWin.ch, as it seems as a preprocessor issue based on the order of the xcommand:

Code (fw): Select all Collapse
#xcommand DEFINE <msg: MESSAGE BAR, MESSAGE, MSGBAR> [<oMsg>] ;   <<< Here !!!
             [ OF <oWnd> ] ;
             [ <prm: PROMPT, TITLE> <cMsg> ] ;
             [ <center: CENTER, CENTERED> ] ;
             [ <clock: CLOCK, TIME> ] ;
             [ <date: DATE> ] ;
             [ <kbd: KEYBOARD> ] ;
             [ FONT <oFont> ] ;
             [ <color: COLOR, COLORS> <nClrFore> [,<nClrBack> ] ] ;
             [ <inset: NO INSET, NOINSET> ] ;
             [ <l2007: 2007, _2007> ] ;
             [ <l2010: 2010, _2010> ] ;
      => ;
         [<oMsg> := ] TMsgBar():New( <oWnd>, <cMsg>, <.center.>,;   <<< Here !!!
                                     <.clock.>, <.date.>, <.kbd.>,;
                                     <nClrFore>, <nClrBack>, <oFont>,;
                                     [!<.inset.>], <.l2007.>, if( <.l2007.>, .F., <.l2010.> ) )


Also this change in Class TMsgBar:
Code (fw): Select all Collapse
METHOD New( oWnd, cPrompt, lCentered, lClock, lDate, lKbd,;
            nClrFore, nClrBack, oFont, lInset, l2007, l2010 ) CLASS TMsgBar

   ...

   ::oWnd        = oWnd
   ::oWnd:oMsgBar = Self    <<< Here !!!
   ::cMsg        = ::cMsgDef  := cPrompt

   ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: DEFINE MESSAGE BAR is pre-processed incorrectly?
Posted: Thu Oct 13, 2011 10:50 AM

Thanks for the quick fix Antonio :)

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion