2008-06-23 19:40 UTC+0200 Viktor Szakats (harbour.01 syenar hu)

* source/rtl/getsys.prg
   * source/rtl/tgetlist.prg
     ! Fixed ReadModal() for C5.2 mode to not accept a 
       (BTW unused) nPos parameter. This could cause an 
       RTE in Harbour if ReadModal( <number> ) was used, 
       with HB_COMPAT_C53 turned off. Default build was 
       not affected.
     + Added hb_GetReadVar( <oGet> ) -> <cVariableName> 
       to get the name of a GET variable in uppercase 
       and including the subscripts.
       Same as existing HBGetList():GetReadVar() on the 
       active GET object.
This commit is contained in:
Viktor Szakats
2008-06-23 17:43:11 +00:00
parent 372ab65e1f
commit 2f80d5d6f1
3 changed files with 32 additions and 18 deletions

View File

@@ -8,6 +8,20 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-23 19:40 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* source/rtl/getsys.prg
* source/rtl/tgetlist.prg
! Fixed ReadModal() for C5.2 mode to not accept a
(BTW unused) nPos parameter. This could cause an
RTE in Harbour if ReadModal( <number> ) was used,
with HB_COMPAT_C53 turned off. Default build was
not affected.
+ Added hb_GetReadVar( <oGet> ) -> <cVariableName>
to get the name of a GET variable in uppercase
and including the subscripts.
Same as existing HBGetList():GetReadVar() on the
active GET object.
2008-06-23 15:57 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbziparch/common.mak
- contrib/hbziparch/zip.h

View File

@@ -71,7 +71,7 @@
FUNCTION ReadModal( GetList, nPos, oMenu, nMsgRow, nMsgLeft, nMsgRight, cMsgColor )
#else
FUNCTION ReadModal( GetList, nPos )
FUNCTION ReadModal( GetList )
#endif
LOCAL oGetList
@@ -97,7 +97,7 @@ FUNCTION ReadModal( GetList, nPos )
#ifdef HB_COMPAT_C53
oGetList:ReadModal( nPos, oMenu, nMsgRow, nMsgLeft, nMsgRight, cMsgColor )
#else
oGetList:ReadModal( nPos )
oGetList:ReadModal()
#endif
__GetListSetActive( oSaveGetList )
@@ -319,3 +319,15 @@ FUNCTION RangeCheck( oGet, xDummy, xLow, xHigh )
ENDIF
RETURN .F.
FUNCTION hb_GetReadVar( oGet )
LOCAL cName := Upper( oGet:name )
LOCAL n
IF oGet:subScript != NIL
FOR n := 1 TO Len( oGet:subScript )
cName += "[" + LTrim( Str( oGet:subScript[ n ] ) ) + "]"
NEXT
ENDIF
RETURN cName

View File

@@ -94,7 +94,7 @@ CREATE CLASS HBGetList
#ifdef HB_COMPAT_C53
METHOD ReadModal( nPos, oMenu, nMsgRow, nMsgLeft, nMsgRight, cMsgColor )
#else
METHOD ReadModal( nPos )
METHOD ReadModal()
#endif
METHOD Settle( nPos, lInit )
METHOD Reader( oMenu, aMsg )
@@ -162,7 +162,7 @@ ENDCLASS
#ifdef HB_COMPAT_C53
METHOD ReadModal( nPos, oMenu, nMsgRow, nMsgLeft, nMsgRight, cMsgColor ) CLASS HBGetList
#else
METHOD ReadModal( nPos ) CLASS HBGetList
METHOD ReadModal() CLASS HBGetList
#endif
#ifdef HB_COMPAT_C53
@@ -198,9 +198,7 @@ METHOD ReadModal( nPos ) CLASS HBGetList
aMsg := { lMsgFlag, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, , , , , }
#else
IF ! ( ISNUMBER( nPos ) .AND. nPos > 0 )
::nPos := ::Settle( 0 )
ENDIF
::nPos := ::Settle( 0 )
#endif
DO WHILE ::nPos != 0
@@ -752,17 +750,7 @@ METHOD PostActiveGet() CLASS HBGetList
METHOD GetReadVar() CLASS HBGetList
LOCAL oGet := ::oGet
LOCAL cName := Upper( oGet:Name )
LOCAL n
IF oGet:Subscript != NIL
FOR n := 1 TO Len( oGet:Subscript )
cName += "[" + LTrim( Str( oGet:Subscript[ n ] ) ) + "]"
NEXT
ENDIF
RETURN cName
RETURN hb_GetReadVar( ::oGet )
METHOD SetFormat( bFormat ) CLASS HBGetList