2012-11-05 03:23 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/*.prg
* contrib/gtwvg/tests/*.prg
* contrib/hbct/fcopy.prg
* contrib/hbgd/gdimage.prg
* contrib/hbhttpd/core.prg
* contrib/hbhttpd/tests/eshop.prg
* contrib/hbmysql/tests/test.prg
* contrib/hbmysql/tmysql.prg
* contrib/hbmzip/tests/*.prg
* contrib/hbnetio/netiomt.prg
* contrib/hbnf/popadder.prg
* contrib/hbsqlit3/hdbcsqlt.prg
* contrib/hbwin/tests/*.prg
* contrib/hbwin/win_tprn.prg
* contrib/hbxpp/tthreadx.prg
* contrib/hbziparc/ziparc.prg
* contrib/xhb/*.prg
* extras/gfspell/spell.prg
* extras/gtwvw/tests/*.prg
* extras/guestbk/testcgi.prg
* extras/hbvpdf/hbvpdf.prg
* extras/hbxlsxml/*.prg
* extras/httpsrv/*.prg
* extras/httpsrv/modules/showcounter.prg
* src/debug/*.prg
* src/rdd/*.prg
* src/rdd/hbsix/*.prg
* src/rdd/usrrdd/rdds/*.prg
* src/rtl/*.prg
* tests/*.prg
* utils/hbtest/*.prg
* website/samples/testcgi.prg.html
* minor
This commit is contained in:
@@ -16,6 +16,41 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-11-05 03:23 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/gtwvg/*.prg
|
||||
* contrib/gtwvg/tests/*.prg
|
||||
* contrib/hbct/fcopy.prg
|
||||
* contrib/hbgd/gdimage.prg
|
||||
* contrib/hbhttpd/core.prg
|
||||
* contrib/hbhttpd/tests/eshop.prg
|
||||
* contrib/hbmysql/tests/test.prg
|
||||
* contrib/hbmysql/tmysql.prg
|
||||
* contrib/hbmzip/tests/*.prg
|
||||
* contrib/hbnetio/netiomt.prg
|
||||
* contrib/hbnf/popadder.prg
|
||||
* contrib/hbsqlit3/hdbcsqlt.prg
|
||||
* contrib/hbwin/tests/*.prg
|
||||
* contrib/hbwin/win_tprn.prg
|
||||
* contrib/hbxpp/tthreadx.prg
|
||||
* contrib/hbziparc/ziparc.prg
|
||||
* contrib/xhb/*.prg
|
||||
* extras/gfspell/spell.prg
|
||||
* extras/gtwvw/tests/*.prg
|
||||
* extras/guestbk/testcgi.prg
|
||||
* extras/hbvpdf/hbvpdf.prg
|
||||
* extras/hbxlsxml/*.prg
|
||||
* extras/httpsrv/*.prg
|
||||
* extras/httpsrv/modules/showcounter.prg
|
||||
* src/debug/*.prg
|
||||
* src/rdd/*.prg
|
||||
* src/rdd/hbsix/*.prg
|
||||
* src/rdd/usrrdd/rdds/*.prg
|
||||
* src/rtl/*.prg
|
||||
* tests/*.prg
|
||||
* utils/hbtest/*.prg
|
||||
* website/samples/testcgi.prg.html
|
||||
* minor
|
||||
|
||||
2012-11-05 02:22 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* extras/gfspell/*.c
|
||||
* extras/gtwvw/*.[c|h]
|
||||
|
||||
@@ -180,7 +180,7 @@ METHOD WvgActiveXControl:Create( oParent, oOwner, aPos, aSize, aPresParams, lVis
|
||||
::oOLE:__hObj := hObj
|
||||
__AxDoVerb( ::pWnd, -4 )
|
||||
|
||||
IF !Empty( ::hEvents )
|
||||
IF ! Empty( ::hEvents )
|
||||
::oOle:__hSink := __AxRegisterHandler( ::oOle:__hObj, {| nEvent, ... | ::execEvent( nEvent, ... ) } )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ METHOD wvtDialog:Create()
|
||||
ENDIF
|
||||
|
||||
FOR i := 1 TO Len( ::aObjects )
|
||||
IF !Empty( ::aObjects[ i ]:aPaint )
|
||||
IF ! Empty( ::aObjects[ i ]:aPaint )
|
||||
FOR j := 1 TO Len( ::aObjects[ i ]:aPaint )
|
||||
wvg_SetPaint( ::cPaintBlockID, ::nPaintID++, ;
|
||||
::aObjects[ i ]:aPaint[ j, 1 ], ::aObjects[ i ]:aPaint[ j, 2 ] )
|
||||
@@ -579,7 +579,7 @@ METHOD wvtDialog:Inkey()
|
||||
|
||||
IF ! ::lEventHandled
|
||||
IF ::nCurObj > 0
|
||||
IF !Empty( ::aDialogKeys )
|
||||
IF ! Empty( ::aDialogKeys )
|
||||
IF ( n := AScan( ::aDialogKeys, {| e_ | e_[ 1 ] == ::nKey } ) ) > 0
|
||||
Eval( ::aDialogKeys[ n, 2 ], self, ::oCurObj )
|
||||
ENDIF
|
||||
@@ -716,9 +716,9 @@ METHOD wvtDialog:ActivateMenu()
|
||||
LOCAL nMenu := Wvt_GetLastMenuEvent()
|
||||
LOCAL aMenuItem
|
||||
|
||||
IF !Empty( nMenu )
|
||||
IF ! Empty( nMenu )
|
||||
IF HB_ISOBJECT( ::oMenu )
|
||||
IF !Empty( aMenuItem := ::oMenu:FindMenuItemById( nMenu ) )
|
||||
IF ! Empty( aMenuItem := ::oMenu:FindMenuItemById( nMenu ) )
|
||||
IF HB_ISBLOCK( aMenuItem[ WVT_MENU_ACTION ] )
|
||||
Eval( aMenuItem[ WVT_MENU_ACTION ] )
|
||||
ENDIF
|
||||
@@ -966,7 +966,7 @@ METHOD WvtObject:CreatePopup()
|
||||
|
||||
LOCAL i, nID
|
||||
|
||||
IF !Empty( ::aPopup ) .AND. ::hPopup == nil
|
||||
IF ! Empty( ::aPopup ) .AND. ::hPopup == nil
|
||||
::hPopup := Wvt_CreatePopupMenu()
|
||||
|
||||
FOR i := 1 TO Len( ::aPopup )
|
||||
@@ -3375,10 +3375,10 @@ METHOD wvtMenu:Create( cCaption )
|
||||
|
||||
METHOD wvtMenu:Destroy()
|
||||
|
||||
IF !Empty( ::hMenu )
|
||||
IF ! Empty( ::hMenu )
|
||||
::DelAllItems()
|
||||
|
||||
IF !Wvt_DestroyMenu( ::hMenu )
|
||||
IF ! Wvt_DestroyMenu( ::hMenu )
|
||||
#if 0
|
||||
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {}, __FILE__ ) )
|
||||
#endif
|
||||
@@ -3394,9 +3394,9 @@ METHOD wvtMenu:AddItem( cCaption, bAction )
|
||||
|
||||
LOCAL lResult := .F., aItem
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. ( !Empty( cCaption ) .OR. !Empty( bAction ) )
|
||||
IF ! Empty( ::hMenu ) .AND. ( ! Empty( cCaption ) .OR. ! Empty( bAction ) )
|
||||
IF HB_ISOBJECT( bAction )
|
||||
cCaption := iif( !Empty( cCaption ), cCaption, bAction:Caption )
|
||||
cCaption := iif( ! Empty( cCaption ), cCaption, bAction:Caption )
|
||||
aItem := { MF_POPUP, bAction:hMenu, cCaption, bAction } /* bAction is a wvtMenu object reference */
|
||||
ELSEIF HB_ISBLOCK( bAction )
|
||||
aItem := { MF_STRING, ::MenuItemId++, cCaption, bAction } /* bAction is a code block to execute */
|
||||
@@ -3408,7 +3408,7 @@ METHOD wvtMenu:AddItem( cCaption, bAction )
|
||||
#endif
|
||||
ENDIF
|
||||
|
||||
IF !Wvt_AppendMenu( ::hMenu, aItem[ WVT_MENU_TYPE ], aItem[ WVT_MENU_IDENTIFIER ], aItem[ WVT_MENU_CAPTION ] )
|
||||
IF ! Wvt_AppendMenu( ::hMenu, aItem[ WVT_MENU_TYPE ], aItem[ WVT_MENU_IDENTIFIER ], aItem[ WVT_MENU_CAPTION ] )
|
||||
#if 0
|
||||
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:AddItem()", "Add menu item", { cCaption, bAction }, __FILE__ ) )
|
||||
#endif
|
||||
@@ -3462,7 +3462,7 @@ METHOD wvtMenu:EnableItem( nItemNum )
|
||||
|
||||
LOCAL nPrevious := - 1
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. !Empty( nItemNum )
|
||||
IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum )
|
||||
nPrevious := Wvt_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_ENABLED )
|
||||
ENDIF
|
||||
|
||||
@@ -3474,7 +3474,7 @@ METHOD wvtMenu:DisableItem( nItemNum )
|
||||
|
||||
LOCAL nPrevious := - 1
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. !Empty( nItemNum )
|
||||
IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum )
|
||||
nPrevious := Wvt_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_GRAYED )
|
||||
ENDIF
|
||||
|
||||
@@ -3504,7 +3504,7 @@ METHOD wvtMenu:FindMenuItemById( nId )
|
||||
|
||||
LOCAL x, aResult := {}
|
||||
|
||||
IF !Empty( nId )
|
||||
IF ! Empty( nId )
|
||||
x := ::NumItems()
|
||||
DO WHILE x > 0 .AND. Empty( aResult )
|
||||
IF ::aItems[ x, WVT_MENU_TYPE ] == MF_POPUP
|
||||
|
||||
@@ -148,7 +148,7 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
hb_gtInfo( HB_GTI_CLOSABLE , ::closable )
|
||||
hb_gtInfo( HB_GTI_WINTITLE , ::title )
|
||||
|
||||
IF !Empty( ::icon )
|
||||
IF ! Empty( ::icon )
|
||||
IF HB_ISNUMERIC( ::icon )
|
||||
hb_gtInfo( HB_GTI_ICONRES, ::icon )
|
||||
|
||||
@@ -197,7 +197,7 @@ METHOD WvgDialog:destroy()
|
||||
AEval( ::aChildren, {| o | o:destroy() } )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::hBrushBG )
|
||||
IF ! Empty( ::hBrushBG )
|
||||
WVG_DeleteObject( ::hBrushBG )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -212,10 +212,10 @@ METHOD WvgMenuBar:configure( oParent, aPresParams, lVisible )
|
||||
|
||||
METHOD WvgMenuBar:destroy()
|
||||
|
||||
IF !Empty( ::hMenu )
|
||||
IF ! Empty( ::hMenu )
|
||||
::DelAllItems()
|
||||
|
||||
IF !WVG_DestroyMenu( ::hMenu )
|
||||
IF ! WVG_DestroyMenu( ::hMenu )
|
||||
#if 0
|
||||
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {}, __FILE__ ) )
|
||||
#endif
|
||||
@@ -374,7 +374,7 @@ METHOD WvgMenuBar:findMenuItemById( nId )
|
||||
|
||||
LOCAL x, aResult := {}
|
||||
|
||||
IF !Empty( nId )
|
||||
IF ! Empty( nId )
|
||||
x := ::numItems()
|
||||
|
||||
DO WHILE x > 0 .AND. Empty( aResult )
|
||||
@@ -397,7 +397,7 @@ METHOD WvgMenuBar:findMenuPosById( nId )
|
||||
|
||||
LOCAL x, nPos
|
||||
|
||||
IF !Empty( nId )
|
||||
IF ! Empty( nId )
|
||||
x := ::numItems()
|
||||
|
||||
DO WHILE x > 0 .AND. Empty( nPos )
|
||||
@@ -422,7 +422,7 @@ METHOD WvgMenuBar:checkItem( nItemNum, lCheck )
|
||||
|
||||
__defaultNIL( @lCheck, .T. )
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
|
||||
IF ! Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
|
||||
nRet := WVG_CheckMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + iif( lCheck, MF_CHECKED, MF_UNCHECKED ) )
|
||||
ENDIF
|
||||
|
||||
@@ -434,7 +434,7 @@ METHOD WvgMenuBar:enableItem( nItemNum )
|
||||
|
||||
LOCAL lSuccess := .F.
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
|
||||
IF ! Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
|
||||
lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_ENABLED )
|
||||
ENDIF
|
||||
|
||||
@@ -446,7 +446,7 @@ METHOD WvgMenuBar:disableItem( nItemNum )
|
||||
|
||||
LOCAL lSuccess := .F.
|
||||
|
||||
IF !Empty( ::hMenu ) .AND. !Empty( nItemNum )
|
||||
IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum )
|
||||
lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_GRAYED )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ FUNCTION WvtPaintObjects()
|
||||
FOR i := 1 TO nBlocks
|
||||
lExe := .T.
|
||||
|
||||
IF aBlocks[ i, 3 ] != NIL .AND. !Empty( aBlocks[ i, 3 ] )
|
||||
IF aBlocks[ i, 3 ] != NIL .AND. ! Empty( aBlocks[ i, 3 ] )
|
||||
/* Check parameters against tlbr_ depending upon the
|
||||
* type of object and attributes contained in aAttr
|
||||
*/
|
||||
@@ -331,11 +331,11 @@ FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle
|
||||
nH := nRows
|
||||
ENDIF
|
||||
|
||||
IF !HB_ISNUMERIC( nStyle )
|
||||
nStyle := + WS_CAPTION + WS_SYSMENU ;
|
||||
+ WS_GROUP + WS_TABSTOP + DS_SETFONT ;
|
||||
+ WS_THICKFRAME + WS_VISIBLE + WS_POPUP ;
|
||||
+ DS_3DLOOK
|
||||
IF ! HB_ISNUMERIC( nStyle )
|
||||
nStyle := ;
|
||||
WS_CAPTION + WS_SYSMENU + WS_GROUP + ;
|
||||
WS_TABSTOP + DS_SETFONT + WS_THICKFRAME + ;
|
||||
WS_VISIBLE + WS_POPUP + DS_3DLOOK
|
||||
ENDIF
|
||||
|
||||
AAdd( aDlg[ 1 ], iif( Empty( nHelpId ), 0, nHelpId ) )
|
||||
|
||||
@@ -408,7 +408,7 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
|
||||
DO CASE
|
||||
CASE xParams[ 1 ] == 0 /* menu selected */
|
||||
IF HB_ISOBJECT( ::oMenu )
|
||||
IF !Empty( aMenuItem := ::oMenu:FindMenuItemById( xParams[ 2 ] ) )
|
||||
IF ! Empty( aMenuItem := ::oMenu:FindMenuItemById( xParams[ 2 ] ) )
|
||||
IF HB_ISBLOCK( aMenuItem[ 2 ] )
|
||||
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
|
||||
|
||||
@@ -518,7 +518,7 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
|
||||
|
||||
IF hWndCtrl == 0 /* It is menu */
|
||||
IF HB_ISOBJECT( ::oMenu )
|
||||
IF !Empty( aMenuItem := ::oMenu:FindMenuItemById( nCtrlID ) )
|
||||
IF ! Empty( aMenuItem := ::oMenu:FindMenuItemById( nCtrlID ) )
|
||||
IF HB_ISBLOCK( aMenuItem[ 2 ] )
|
||||
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ PROCEDURE GCUIConsole( oCrt )
|
||||
LOCAL dDate := Date()
|
||||
LOCAL cName := PadR( "Some Usefule Name", 35 )
|
||||
LOCAL cAdd1 := PadR( "Linda Goldman Avenue", 35 )
|
||||
LOCAL cAdd2 := PadR( "Excellent Street" , 35 )
|
||||
LOCAL cAdd3 := PadR( "Suit #415" , 35 )
|
||||
LOCAL cAdd2 := PadR( "Excellent Street", 35 )
|
||||
LOCAL cAdd3 := PadR( "Suit #415", 35 )
|
||||
LOCAL nSlry := 9000
|
||||
LOCAL nColGet := 8
|
||||
LOCAL GetList := {}
|
||||
@@ -57,7 +57,7 @@ PROCEDURE GCUIConsole( oCrt )
|
||||
@ MaxRow(), 0 SAY PadC( "Navigate the Gets", MaxCol() + 1 ) COLOR "W+/B"
|
||||
|
||||
@ 2, nColGet SAY "< Date >"
|
||||
@ 5, nColGet SAY "<" + PadC( "Name" , 33 ) + ">"
|
||||
@ 5, nColGet SAY "<" + PadC( "Name", 33 ) + ">"
|
||||
@ 8, nColGet SAY "<" + PadC( "Address", 33 ) + ">"
|
||||
@ 15, nColGet SAY "< Salary >"
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ STATIC FUNCTION ExecForm( aPaint )
|
||||
SetKey( K_F2, {|| DoModalDialog() } )
|
||||
|
||||
@ 6, nColGet SAY "< Date >"
|
||||
@ 9, nColGet SAY "<" + PadC( "Name" , 33 ) + ">"
|
||||
@ 9, nColGet SAY "<" + PadC( "Name", 33 ) + ">"
|
||||
@ 12, nColGet SAY "<" + PadC( "Address", 33 ) + ">"
|
||||
@ 16, 61 SAY "< Salary >"
|
||||
@ 7, nColGet GET dDate WHEN DispStatusMsg( "Date must be Valid" )
|
||||
|
||||
@@ -224,7 +224,7 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam )
|
||||
IF Empty( SetIcons() )
|
||||
SetIcons( WVG_LoadIcon( "vr_1.ico" ) )
|
||||
ENDIF
|
||||
IF !Empty( SetIcons() )
|
||||
IF ! Empty( SetIcons() )
|
||||
WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, SetIcons()[ 1 ] )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
|
||||
// place 2 spaces before and after the buttons
|
||||
nColCap := Len( cCaption ) + 7 // " - "+" "+caption+" "
|
||||
nColTxt := 0
|
||||
IF !Empty( aText_ )
|
||||
IF ! Empty( aText_ )
|
||||
AEval( aText_, {| e | nColTxt := Max( nColTxt, Len( e ) ) } )
|
||||
ENDIF
|
||||
nColTxt += 6 // for two spaces at both sides
|
||||
@@ -178,7 +178,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
|
||||
Wvg_BoxRaised( nTop, nLeft, nBottom, nRight )
|
||||
|
||||
SetColor( pal_[ DLG_CLR_TEXT ] )
|
||||
IF !Empty( aText_ )
|
||||
IF ! Empty( aText_ )
|
||||
FOR i := 1 TO Len( aText_ )
|
||||
@ nTop + 1 + i, nLeft SAY PadC( aText_[ i ], nRight - nLeft + 1 )
|
||||
NEXT
|
||||
@@ -297,7 +297,7 @@ FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ;
|
||||
|
||||
aPos := iif( lCenter, { -1, -1 }, iif( nRow == NIL, { nT, nL }, { nRow, nCol } ) )
|
||||
|
||||
oCrt := WvgCrt():new( , , aPos, { nB - nT, nR - nL }, , !lHidden )
|
||||
oCrt := WvgCrt():new( ,, aPos, { nB - nT, nR - nL },, ! lHidden )
|
||||
oCrt:lModal := lModal
|
||||
IF lRowCols
|
||||
oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS
|
||||
|
||||
@@ -395,7 +395,7 @@ FUNCTION SetFonts( hFont )
|
||||
|
||||
THREAD STATIC t_ahFonts := {}
|
||||
oldFont := t_ahFonts
|
||||
IF !Empty( hFont )
|
||||
IF ! Empty( hFont )
|
||||
AAdd( t_ahFonts, hFont )
|
||||
ENDIF
|
||||
|
||||
@@ -409,7 +409,7 @@ FUNCTION SetIcons( hIcon )
|
||||
|
||||
THREAD STATIC t_ahIcons := {}
|
||||
oldIcon := t_ahIcons
|
||||
IF !Empty( hIcon )
|
||||
IF ! Empty( hIcon )
|
||||
AAdd( t_ahIcons, hIcon )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
|
||||
lOpen := .F.
|
||||
cUseAlias := "TEST"
|
||||
USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW Alias ( cUseAlias ) SHARED
|
||||
IF !NetErr()
|
||||
IF ! NetErr()
|
||||
lOpen := .T.
|
||||
oWvtBrw := ConfigBrowser( { 1, 7, 9, 10, 8 }, cUseAlias, { 6, 67, 36, 120 }, "test.dbf - 1,7,9,10,8", oDlg, "N/W*,N/GR*", 1001 )
|
||||
oDlg:AddObject( oWvtBrw )
|
||||
@@ -312,7 +312,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
|
||||
lOpen1 := .F.
|
||||
cUseAlias1 := "TEST1"
|
||||
USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW Alias ( cUseAlias1 ) SHARED
|
||||
IF !NetErr()
|
||||
IF ! NetErr()
|
||||
lOpen1 := .T.
|
||||
oWvtBrw1 := ConfigBrowser( { 1, 2, 3, 4, 5, 6 }, cUseAlias1, { 43, 4, 51, 120 }, "test.dbf - 1,2,3,4,5,6", oDlg, "N/BG*,N/W*", 1002 )
|
||||
oDlg:AddObject( oWvtBrw1 )
|
||||
|
||||
@@ -185,7 +185,7 @@ METHOD WvgToolBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
|
||||
::SetWindowProcCallback()
|
||||
#endif
|
||||
|
||||
IF !Empty( ::hWnd )
|
||||
IF ! Empty( ::hWnd )
|
||||
::SendToolbarMessage( TB_BUTTONSTRUCTSIZE )
|
||||
::hImageList := WAPI_ImageList_Create( ::imageWidth, ::imageHeight, ILC_COLOR32 + ILC_MASK, 0, 1 )
|
||||
::SendToolbarMessage( TB_SETIMAGELIST, ::hImageList )
|
||||
@@ -265,7 +265,7 @@ METHOD WvgToolBar:destroy()
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::hImageList )
|
||||
IF ! Empty( ::hImageList )
|
||||
WAPI_ImageList_Destroy( ::hImageList )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -685,7 +685,7 @@ METHOD WvgWindow:setFontCompoundName( xFont )
|
||||
IF HB_ISNUMERIC( cFont )
|
||||
|
||||
ELSE
|
||||
IF !Empty( xFont )
|
||||
IF ! Empty( xFont )
|
||||
cFont := xFont
|
||||
s := Lower( cFont )
|
||||
n := AScan( aAttr, {| e | At( e, cFont ) > 0 } )
|
||||
|
||||
@@ -97,7 +97,7 @@ FUNCTION FILECOPY( cSource, cDest, lMode )
|
||||
IF t_hSrcFile != F_ERROR
|
||||
hDstFile := FCreate( cDest )
|
||||
IF hDstFile != F_ERROR
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
nSrcBytes := FRead( t_hSrcFile, @cBuffer, F_BLOCK )
|
||||
IF nSrcBytes == 0
|
||||
lDone := .T.
|
||||
@@ -112,7 +112,7 @@ FUNCTION FILECOPY( cSource, cDest, lMode )
|
||||
ENDIF
|
||||
ENDDO
|
||||
FClose( hDstFile )
|
||||
IF lDone .OR. !lMode
|
||||
IF lDone .OR. ! lMode
|
||||
FClose( t_hSrcFile )
|
||||
t_hSrcFile := F_ERROR
|
||||
ENDIF
|
||||
@@ -153,7 +153,7 @@ FUNCTION FILECCONT( cDest )
|
||||
IF t_hSrcFile != F_ERROR
|
||||
hDstFile := FCreate( cDest )
|
||||
IF hDstFile != F_ERROR
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
nSrcBytes := FRead( t_hSrcFile, @cBuffer, F_BLOCK )
|
||||
IF nSrcBytes == 0
|
||||
lDone := 0
|
||||
@@ -198,7 +198,7 @@ FUNCTION FILEAPPEND( cSrc, cDest )
|
||||
|
||||
hSrcFile := FOpen( cSrc, FO_READ )
|
||||
IF hSrcFile != F_ERROR
|
||||
IF !hb_FileExists( cDest )
|
||||
IF ! hb_FileExists( cDest )
|
||||
hDstFile := FCreate( cDest )
|
||||
ELSE
|
||||
hDstFile := FOpen( cDest, FO_WRITE )
|
||||
|
||||
@@ -556,7 +556,7 @@ METHOD Rotate( nAngle, lInside ) CLASS GDImage
|
||||
|
||||
hb_default( @lInside, .F. )
|
||||
|
||||
IF !lInside
|
||||
IF ! lInside
|
||||
nWidth := ::Width * cos( nAngRad ) + ::Height * sin( nAngRad )
|
||||
nHeight := ::Width * sin( nAngRad ) + ::Height * cos( nAngRad )
|
||||
ELSE
|
||||
@@ -569,7 +569,7 @@ METHOD Rotate( nAngle, lInside ) CLASS GDImage
|
||||
ELSE
|
||||
oDestImage := GDImage():Create( nWidth, nHeight )
|
||||
ENDIF
|
||||
IF !lInside
|
||||
IF ! lInside
|
||||
::CopyRotated( ,,,, nWidth - nWidth / 2, nHeight - nHeight / 2, nAngle, oDestImage )
|
||||
ELSE
|
||||
::CopyRotated( ,,,,,, nAngle, oDestImage )
|
||||
|
||||
@@ -964,13 +964,13 @@ STATIC FUNCTION GetErrorDesc( oErr )
|
||||
cRet := "ERRORLOG ============================================================" + hb_eol() + ;
|
||||
"Error: " + oErr:subsystem + "/" + ErrDescCode( oErr:genCode ) + "(" + hb_ntos( oErr:genCode ) + ") " + ;
|
||||
hb_ntos( oErr:subcode ) + hb_eol()
|
||||
IF !Empty( oErr:filename ); cRet += "File: " + oErr:filename + hb_eol()
|
||||
IF ! Empty( oErr:filename ); cRet += "File: " + oErr:filename + hb_eol()
|
||||
ENDIF
|
||||
IF !Empty( oErr:description ); cRet += "Description: " + oErr:description + hb_eol()
|
||||
IF ! Empty( oErr:description ); cRet += "Description: " + oErr:description + hb_eol()
|
||||
ENDIF
|
||||
IF !Empty( oErr:operation ); cRet += "Operation: " + oErr:operation + hb_eol()
|
||||
IF ! Empty( oErr:operation ); cRet += "Operation: " + oErr:operation + hb_eol()
|
||||
ENDIF
|
||||
IF !Empty( oErr:osCode ); cRet += "OS error: " + hb_ntos( oErr:osCode ) + hb_eol()
|
||||
IF ! Empty( oErr:osCode ); cRet += "OS error: " + hb_ntos( oErr:osCode ) + hb_eol()
|
||||
ENDIF
|
||||
IF HB_ISARRAY( oErr:args )
|
||||
cRet += "Arguments:" + hb_eol()
|
||||
@@ -1511,14 +1511,14 @@ PROCEDURE UProcInfo()
|
||||
AEval( ASort( hb_HKeys( server ) ), {| X | UWrite( '<tr><td>' + X + '</td><td>' + UHtmlEncode( hb_CStr( server[ X ] ) ) + '</td></tr>' ) } )
|
||||
UWrite( '</table>' )
|
||||
|
||||
IF !Empty( get )
|
||||
IF ! Empty( get )
|
||||
UWrite( '<h3>get</h3>' )
|
||||
UWrite( '<table border=1 cellspacing=0>' )
|
||||
AEval( ASort( hb_HKeys( get ) ), {| X | UWrite( '<tr><td>' + X + '</td><td>' + UHtmlEncode( hb_CStr( get[ X ] ) ) + '</td></tr>' ) } )
|
||||
UWrite( '</table>' )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( post )
|
||||
IF ! Empty( post )
|
||||
UWrite( '<h3>post</h3>' )
|
||||
UWrite( '<table border=1 cellspacing=0>' )
|
||||
AEval( ASort( hb_HKeys( post ) ), {| X | UWrite( '<tr><td>' + X + '</td><td>' + UHtmlEncode( hb_CStr( post[ X ] ) ) + '</td></tr>' ) } )
|
||||
|
||||
@@ -149,7 +149,7 @@ STATIC FUNCTION proc_login()
|
||||
ordSetFocus( "user" )
|
||||
cUser := PadR( hb_HGetDef( post, "user", "" ), 16 )
|
||||
USessionStart()
|
||||
IF !Empty( cUser ) .AND. dbSeek( cUser, .F. ) .AND. ! Deleted() .AND. ;
|
||||
IF ! Empty( cUser ) .AND. dbSeek( cUser, .F. ) .AND. ! Deleted() .AND. ;
|
||||
PadR( hb_HGetDef( post, "password", "" ), 16 ) == FIELD->PASSWORD
|
||||
session[ "user" ] := cUser
|
||||
URedirect( "main" )
|
||||
|
||||
@@ -72,7 +72,7 @@ PROCEDURE Main( cArg )
|
||||
|
||||
dbUseArea( .T.,, cArg, "wn", .F. )
|
||||
|
||||
IF !oServer:DeleteTable( "test" )
|
||||
IF ! oServer:DeleteTable( "test" )
|
||||
Alert( oServer:Error() )
|
||||
ENDIF
|
||||
|
||||
@@ -88,7 +88,7 @@ PROCEDURE Main( cArg )
|
||||
|
||||
oServer:Destroy()
|
||||
|
||||
DO WHILE !wn->( Eof() )
|
||||
DO WHILE ! wn->( Eof() )
|
||||
|
||||
oQuery2 := oServer:Query( "SELECT * from test where CODF='" + wn->CODF + "' and CODP='" + wn->CODP + "'" )
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ METHOD FieldPut( cnField, Value ) CLASS TMySQLRow
|
||||
ENDIF
|
||||
|
||||
// Save starting value for this field
|
||||
IF !::aDirty[ nNum ]
|
||||
IF ! ::aDirty[ nNum ]
|
||||
::aOldValue[ nNum ] := ::aRow[ nNum ]
|
||||
::aDirty[ nNum ] := .T.
|
||||
ENDIF
|
||||
@@ -186,8 +186,8 @@ METHOD FieldDec( nNum, lFormat ) CLASS TMySQLRow
|
||||
|
||||
IF nNum >= 1 .AND. nNum <= Len( ::aFieldStruct )
|
||||
|
||||
IF !lFormat .AND. ( ::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_FLOAT .OR. ;
|
||||
::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_DOUBLE )
|
||||
IF ! lFormat .AND. ( ::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_FLOAT .OR. ;
|
||||
::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_DOUBLE )
|
||||
RETURN Set( _SET_DECIMALS )
|
||||
ELSE
|
||||
RETURN ::aFieldStruct[ nNum ][ MYSQL_FS_DECIMALS ]
|
||||
@@ -345,7 +345,7 @@ METHOD New( nSocket, cQuery ) CLASS TMySQLQuery
|
||||
IF mysql_query( nSocket, cQuery ) == 0
|
||||
|
||||
// save result set
|
||||
IF !Empty( ::nResultHandle := mysql_store_result( nSocket ) )
|
||||
IF ! Empty( ::nResultHandle := mysql_store_result( nSocket ) )
|
||||
|
||||
::nNumRows := mysql_num_rows( ::nResultHandle )
|
||||
::nNumFields := mysql_num_fields( ::nResultHandle )
|
||||
@@ -407,7 +407,7 @@ METHOD Refresh() CLASS TMySQLQuery
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN !::lError
|
||||
RETURN ! ::lError
|
||||
|
||||
|
||||
METHOD Skip( nRows ) CLASS TMySQLQuery
|
||||
@@ -678,8 +678,8 @@ METHOD FieldDec( nNum, lFormat ) CLASS TMySQLQuery
|
||||
ENDIF
|
||||
|
||||
IF nNum >= 1 .AND. nNum <= Len( ::aFieldStruct )
|
||||
IF !lFormat .AND. ( ::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_FLOAT .OR. ;
|
||||
::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_DOUBLE )
|
||||
IF ! lFormat .AND. ( ::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_FLOAT .OR. ;
|
||||
::aFieldStruct[ nNum ][ MYSQL_FS_TYPE ] == MYSQL_TYPE_DOUBLE )
|
||||
RETURN Set( _SET_DECIMALS )
|
||||
ELSE
|
||||
RETURN ::aFieldStruct[ nNum ][ MYSQL_FS_DECIMALS ]
|
||||
@@ -833,7 +833,7 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
|
||||
|
||||
// no Change
|
||||
IF Right( cUpdateQuery, 4 ) == "SET "
|
||||
RETURN !::lError
|
||||
RETURN ! ::lError
|
||||
ENDIF
|
||||
|
||||
// remove last comma
|
||||
@@ -925,7 +925,7 @@ METHOD Update( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN !::lError
|
||||
RETURN ! ::lError
|
||||
|
||||
|
||||
// DAVID: lOldRecord, lRefresh added
|
||||
@@ -1023,7 +1023,7 @@ METHOD Delete( oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN !::lError
|
||||
RETURN ! ::lError
|
||||
|
||||
|
||||
// Adds a row with values passed into oRow
|
||||
@@ -1259,7 +1259,7 @@ METHOD Refresh() CLASS TMySQLTABLE
|
||||
::lError := .T.
|
||||
ENDIF
|
||||
|
||||
RETURN !::lError
|
||||
RETURN ! ::lError
|
||||
|
||||
|
||||
// returns a WHERE x=y statement which uses primary key (if available)
|
||||
@@ -1362,14 +1362,14 @@ METHOD sql_version() CLASS TMySQLServer
|
||||
|
||||
|
||||
// METHOD SelectDB( cDBName ) CLASS TMySQLServer
|
||||
//
|
||||
//
|
||||
// IF mysql_select_db( ::nSocket, cDBName ) == 0
|
||||
// ::cDBName := cDBName
|
||||
// RETURN .T.
|
||||
// ELSE
|
||||
// ::cDBName := ""
|
||||
// ENDIF
|
||||
//
|
||||
//
|
||||
// RETURN .F.
|
||||
|
||||
|
||||
@@ -1565,14 +1565,14 @@ METHOD Query( cQuery ) CLASS TMySQLServer
|
||||
i := 1
|
||||
nNumTables := 1
|
||||
|
||||
DO WHILE !( ( cToken := hb_tokenGet( cUpperQuery, i++, " " ) ) == "FROM" ) .AND. !Empty( cToken )
|
||||
DO WHILE !( ( cToken := hb_tokenGet( cUpperQuery, i++, " " ) ) == "FROM" ) .AND. ! Empty( cToken )
|
||||
ENDDO
|
||||
|
||||
// first token after "FROM" is a table name
|
||||
// NOTE: SubSelects ?
|
||||
cTableName := hb_tokenGet( cUpperQuery, i++, " " )
|
||||
|
||||
DO WHILE !( ( cToken := hb_tokenGet( cUpperQuery, i++, " " ) ) == "WHERE" ) .AND. !Empty( cToken )
|
||||
DO WHILE !( ( cToken := hb_tokenGet( cUpperQuery, i++, " " ) ) == "WHERE" ) .AND. ! Empty( cToken )
|
||||
// do we have more than one table referenced ?
|
||||
IF cToken == "," .OR. cToken == "JOIN"
|
||||
nNumTables++
|
||||
|
||||
@@ -88,7 +88,7 @@ PROCEDURE Main( ... )
|
||||
? "Archive file:", cFileName
|
||||
HB_UnzipGlobalInfo( hUnzip, @nSize, @cComment )
|
||||
? "Number of entires:", nSize
|
||||
IF !Empty( cComment )
|
||||
IF ! Empty( cComment )
|
||||
? "global comment:", cComment
|
||||
ENDIF
|
||||
? ""
|
||||
@@ -98,7 +98,7 @@ PROCEDURE Main( ... )
|
||||
DO WHILE nErr == 0
|
||||
HB_UnzipFileInfo( hUnzip, @cFile, @dDate, @cTime, , , , @nSize, @nCompSize, @lCrypted, @cComment )
|
||||
? PadR( cFile + iif( lCrypted, "*", "" ), 30 ), DToC( dDate ), cTime, nSize, nCompSize
|
||||
IF !Empty( cComment )
|
||||
IF ! Empty( cComment )
|
||||
? "comment:", cComment
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ PROCEDURE Main( ... )
|
||||
IF ! Empty( hZip )
|
||||
? "Archive file:", cZipName
|
||||
FOR EACH cWild IN aWild
|
||||
IF !Empty( cWild )
|
||||
IF ! Empty( cWild )
|
||||
hb_FNameSplit( cWild, @cPath, @cFileName, @cExt )
|
||||
aDir := hb_DirScan( cPath, cFileName + cExt )
|
||||
FOR EACH aFile IN aDir
|
||||
|
||||
@@ -87,7 +87,7 @@ FUNCTION NETIO_MTSERVER( nPort, cIfAddr, cRootDir, xRPC, ;
|
||||
ENDSWITCH
|
||||
|
||||
pListenSocket := netio_listen( nPort, cIfAddr, cRootDir, lRPC )
|
||||
IF !Empty( pListenSocket )
|
||||
IF ! Empty( pListenSocket )
|
||||
hb_threadDetach( hb_threadStart( @netio_srvloop(), pListenSocket, ;
|
||||
xRPC, sSrvFunc, ;
|
||||
cPasswd, nCompressLevel, nStrategy ) )
|
||||
|
||||
@@ -214,7 +214,7 @@ FUNCTION FT_Adder()
|
||||
_ftDisplayTape( aAdder, nKey )
|
||||
ENDIF
|
||||
hb_DispOutAt( 4 + nTopOS, 8 + nAddSpace, cTotal )
|
||||
IF !Empty( cMoveTotSubTot )
|
||||
IF ! Empty( cMoveTotSubTot )
|
||||
_ftSetWinColor( W_CURR, W_SCREEN )
|
||||
hb_DispOutAt( 6 + nTopOS, 18 + nAddSpace, iif( cMoveTotSubTot == "T", " <TOTAL>", ;
|
||||
"<SUBTOTAL>" ) )
|
||||
@@ -449,7 +449,7 @@ STATIC FUNCTION _ftAddTotal( aAdder )
|
||||
nDecDigit := 0
|
||||
lClAdder := .F. // Reset the Clear flag
|
||||
IF lSubRtn // If this was the second time they
|
||||
IF !lMultDiv
|
||||
IF ! lMultDiv
|
||||
_ftSetWinColor( W_CURR, W_SCREEN )
|
||||
hb_DispOutAt( 6 + nTopOS, 18 + nAddSpace, " <TOTAL>" )
|
||||
_ftSetWinColor( W_CURR, W_PROMPT )
|
||||
@@ -474,7 +474,7 @@ STATIC FUNCTION _ftAddTotal( aAdder )
|
||||
lSubRtn := .F.
|
||||
_ftUpdateTrans( aAdder, .F., nNumTotal )
|
||||
ENDIF
|
||||
IF !lMultDiv
|
||||
IF ! lMultDiv
|
||||
lSubRtn := .T. // total key
|
||||
ENDIF
|
||||
IF nAddMode == 1 // Add
|
||||
@@ -532,7 +532,7 @@ STATIC FUNCTION _ftAddSub( aAdder, nKey )
|
||||
ENDIF
|
||||
IF nKey == hb_keyCode( "+" ) // Add
|
||||
nAddMode := 1
|
||||
IF !lNewNum // They pressed + again to add the same
|
||||
IF ! lNewNum // They pressed + again to add the same
|
||||
nNumTotal := nSavSubTot // number without re-entering
|
||||
ENDIF
|
||||
_ftUpdateTrans( aAdder, .F., nNumTotal )
|
||||
@@ -542,7 +542,7 @@ STATIC FUNCTION _ftAddSub( aAdder, nKey )
|
||||
nNumTotal := 0
|
||||
ELSEIF nKey == hb_keyCode( "-" ) // Subtract
|
||||
nAddMode := 2
|
||||
IF !lNewNum // They pressed + again to add the same
|
||||
IF ! lNewNum // They pressed + again to add the same
|
||||
nNumTotal := nSavSubTot // number without re-entering
|
||||
lNewNum := .T.
|
||||
ENDIF
|
||||
|
||||
@@ -188,7 +188,7 @@ METHOD executeUpdate( cSql ) CLASS hdbcSQLTStatement
|
||||
|
||||
METHOD close() CLASS hdbcSQLTStatement
|
||||
|
||||
IF !HB_ISNIL( ::pRes )
|
||||
IF ! HB_ISNIL( ::pRes )
|
||||
|
||||
sqlite3_finalize( ::pRes )
|
||||
|
||||
@@ -235,7 +235,7 @@ METHOD new( pDB, cSql ) CLASS hdbcSQLTPreparedStatement
|
||||
|
||||
METHOD executeQuery() CLASS hdbcSQLTPreparedStatement
|
||||
|
||||
IF !::lPrepared
|
||||
IF ! ::lPrepared
|
||||
::aParams := ASize( ::aParams, ::nParams )
|
||||
/* TODO */
|
||||
ENDIF
|
||||
@@ -248,7 +248,7 @@ METHOD executeQuery() CLASS hdbcSQLTPreparedStatement
|
||||
|
||||
METHOD executeUpdate() CLASS hdbcSQLTPreparedStatement
|
||||
|
||||
IF !::lPrepared
|
||||
IF ! ::lPrepared
|
||||
::aParams := ASize( ::aParams, ::nParams )
|
||||
/* TODO */
|
||||
ENDIF
|
||||
@@ -263,7 +263,7 @@ METHOD setString( nParam, xValue ) CLASS hdbcSQLTPreparedStatement
|
||||
|
||||
::aParams[ nParam ] := xValue
|
||||
|
||||
IF !::lPrepared
|
||||
IF ! ::lPrepared
|
||||
IF nParam > ::nParams
|
||||
::nParams := nParam
|
||||
ENDIF
|
||||
@@ -438,7 +438,7 @@ METHOD findColumn( cField ) CLASS hdbcSQLTResultSet
|
||||
LOCAL nCount
|
||||
LOCAL nMax
|
||||
|
||||
IF !HB_ISHASH( ::hColNames )
|
||||
IF ! HB_ISHASH( ::hColNames )
|
||||
::hColNames := { => }
|
||||
nMax := sqlite3_column_count( ::pRes )
|
||||
FOR nCount := 1 TO nMax
|
||||
|
||||
@@ -21,7 +21,7 @@ PROCEDURE Main()
|
||||
|
||||
oObject := win_OleCreateObject( "MyOleRPCServer" )
|
||||
|
||||
IF !Empty( oObject )
|
||||
IF ! Empty( oObject )
|
||||
IF oObject:connect( NETSERVER, NETPORT,, NETPASSWD )
|
||||
? "Connected to the server:", NETSERVER
|
||||
/* execute some functions on the server side and display
|
||||
|
||||
@@ -18,7 +18,7 @@ PROCEDURE Main()
|
||||
|
||||
oObject := win_OleCreateObject( "MyOleTimeServer" )
|
||||
|
||||
IF !Empty( oObject )
|
||||
IF ! Empty( oObject )
|
||||
? "DATE:", oObject:Date()
|
||||
? "TIME:", oObject:Time()
|
||||
? "DATTIME:", oObject:datetime()
|
||||
|
||||
@@ -19,7 +19,7 @@ PROCEDURE Main()
|
||||
|
||||
oObject := win_OleCreateObject( "MyOleObjServer" )
|
||||
|
||||
IF !Empty( oObject )
|
||||
IF ! Empty( oObject )
|
||||
oTime := oObject:timer()
|
||||
? "TIMER:"
|
||||
? " date:", oTime:date
|
||||
|
||||
@@ -167,7 +167,7 @@ PROCEDURE Main( cPortName )
|
||||
Inkey( 0 )
|
||||
|
||||
oWinPort := Win_Com():Init( cPortName, WIN_CBR_9600, WIN_NOPARITY, 99, WIN_ONESTOPBIT )
|
||||
IF !oWinPort:Open
|
||||
IF ! oWinPort:Open
|
||||
? "Open() failed :", oWinPort:ErrorText()
|
||||
ELSE
|
||||
? "Open succeeded"
|
||||
|
||||
@@ -18,16 +18,10 @@ PROCEDURE Main()
|
||||
|
||||
#if defined( __PLATFORM__WINCE )
|
||||
|
||||
LOCAL o
|
||||
LOCAL l
|
||||
LOCAL nTotal, nUsed
|
||||
LOCAL o := wce_sim():New()
|
||||
LOCAL a
|
||||
|
||||
o := wce_sim():New()
|
||||
|
||||
l := o:lInitialize()
|
||||
|
||||
IF l
|
||||
IF o:lInitialize()
|
||||
Alert( "Api Sim initialized!!" + Str( o:nLastError ) )
|
||||
ELSE
|
||||
Alert( "Api Sim NOT initialized!!. Error " + Str( o:nLastError ) )
|
||||
@@ -41,31 +35,30 @@ PROCEDURE Main()
|
||||
ENDIF
|
||||
|
||||
a := o:aGetAllPhoneBookEntries()
|
||||
AEval( a, {| n, m | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ) ) } )
|
||||
AEval( a, {| n | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ) ) } )
|
||||
#endif
|
||||
|
||||
IF !o:lGetSimPhoneEntry( 1, SIM_PBSTORAGE_SIM, @a )
|
||||
IF ! o:lGetSimPhoneEntry( 1, SIM_PBSTORAGE_SIM, @a )
|
||||
Alert( "Pos 1 error" )
|
||||
ELSE
|
||||
Alert( "VALTYPE-> " + ValType( a ) + " LEN -> " + Str( Len( a ) ), a[ 1 ][ 1 ] )
|
||||
AEval( a, {| n, m | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ), "pos 1" ) } )
|
||||
AEval( a, {| n | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ), "pos 1" ) } )
|
||||
ENDIF
|
||||
|
||||
IF !o:lGetSimPhoneEntry( 110, SIM_PBSTORAGE_SIM, @a )
|
||||
IF ! o:lGetSimPhoneEntry( 110, SIM_PBSTORAGE_SIM, @a )
|
||||
Alert( "Pos 123 error" )
|
||||
ELSE
|
||||
AEval( a, {| n, m | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ), "pos 110" ) } )
|
||||
AEval( a, {| n | Alert( "Phone: " + n[ 1 ] + hb_eol() + "Name: " + n[ 2 ] + hb_eol() + "Adr. Type: " + Str( n[ 3 ] ) + hb_eol() + "Plan Type: " + Str( n[ 4 ] ), "pos 110" ) } )
|
||||
ENDIF
|
||||
|
||||
IF !o:lSetSimPhoneEntry( 80, SIM_PBSTORAGE_SIM, "660099696", "pepeluis", SIM_NUMPLAN_UNKNOWN, SIM_ADDRTYPE_NATIONAL )
|
||||
IF ! o:lSetSimPhoneEntry( 80, SIM_PBSTORAGE_SIM, "660099696", "pepeluis", SIM_NUMPLAN_UNKNOWN, SIM_ADDRTYPE_NATIONAL )
|
||||
Alert( "Error writing pos 80 Errpr=>" + Str( o:nLastError ) )
|
||||
ENDIF
|
||||
IF !o:lDelSimPhoneEntry( 80, SIM_PBSTORAGE_SIM )
|
||||
IF ! o:lDelSimPhoneEntry( 80, SIM_PBSTORAGE_SIM )
|
||||
Alert( "Error deletein pos 80 Errpr=>" + Str( o:nLastError ) )
|
||||
ENDIF
|
||||
|
||||
l := o:lDeInitialize()
|
||||
IF !l
|
||||
IF ! o:lDeInitialize()
|
||||
Alert( "Not De-Initialized SIM api. Error :" + Str( o:nLastError ) )
|
||||
ELSE
|
||||
Alert( "Api Sim Deinitialized!!!" )
|
||||
|
||||
@@ -249,7 +249,7 @@ METHOD Create() CLASS WIN_PRN
|
||||
::PaperLength, ::PaperWidth )
|
||||
ENDIF
|
||||
|
||||
IF !lResult
|
||||
IF ! lResult
|
||||
::hPrinterDC := NIL
|
||||
ELSE
|
||||
IF ::BkMode != NIL
|
||||
|
||||
@@ -161,7 +161,7 @@ METHOD quit( xResult, nRestart ) CLASS THREAD
|
||||
IF PCOUNT() > 0
|
||||
::result := xResult
|
||||
ENDIF
|
||||
IF !HB_ISNUMERIC( nRestart ) .OR. nRestart != QUIT_RESTART
|
||||
IF ! HB_ISNUMERIC( nRestart ) .OR. nRestart != QUIT_RESTART
|
||||
::interval := NIL
|
||||
ENDIF
|
||||
QUIT
|
||||
@@ -251,7 +251,7 @@ METHOD start( xAction, ... ) CLASS THREAD
|
||||
* it can be resumed
|
||||
*/
|
||||
|
||||
IF !HB_ISNUMERIC( ::interval )
|
||||
IF ! HB_ISNUMERIC( ::interval )
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ PROCEDURE hb_SetBuffer( nWriteBuffer, nExtractBuffer, nReadBuffer )
|
||||
HB_SYMBOL_UNUSED( nWriteBuffer )
|
||||
HB_SYMBOL_UNUSED( nExtractBuffer )
|
||||
|
||||
IF !Empty( nReadBuffer )
|
||||
IF ! Empty( nReadBuffer )
|
||||
t_nReadBuffer := Min( nReadBuffer, 32768 )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ PROCEDURE HB_ToLogFile( cLogFile, ... )
|
||||
|
||||
LOCAL nHandle
|
||||
|
||||
IF !s_lToLogFile
|
||||
IF ! s_lToLogFile
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
@@ -106,7 +106,7 @@ PROCEDURE HB_ToLogFile( cLogFile, ... )
|
||||
|
||||
IF cLogFile != NIL
|
||||
|
||||
IF !s_lEmptyLogFile .AND. hb_FileExists( cLogFile )
|
||||
IF ! s_lEmptyLogFile .AND. hb_FileExists( cLogFile )
|
||||
nHandle := FOpen( cLogFile, FO_READWRITE + FO_SHARED )
|
||||
ELSE
|
||||
nHandle := FCreate( cLogFile )
|
||||
|
||||
@@ -111,7 +111,7 @@ STATIC FUNCTION __HB_DumpVar( xVar, lAssocAsObj, lRecursive, nIndent, nRecursion
|
||||
DO CASE
|
||||
CASE cType == "O"
|
||||
|
||||
IF !lAssocAsObj .AND. xVar:ClassName == "TASSOCIATIVEARRAY"
|
||||
IF ! lAssocAsObj .AND. xVar:ClassName == "TASSOCIATIVEARRAY"
|
||||
cString += Space( nIndent ) + "Type='Associative' -> " + hb_eol()
|
||||
// Keys extraction.
|
||||
IF Len( xVar:Keys ) > 0
|
||||
|
||||
@@ -147,7 +147,7 @@ STATIC FUNCTION xhb_cgi_DefError( e )
|
||||
|
||||
i := 2
|
||||
|
||||
DO WHILE !Empty( ProcName( i ) )
|
||||
DO WHILE ! Empty( ProcName( i ) )
|
||||
|
||||
cErrString += "Called from " + RTrim( ProcName( i ) ) + ;
|
||||
"(" + hb_ntos( ProcLine( i ) ) + ") <BR>" + CRLF()
|
||||
@@ -227,10 +227,10 @@ STATIC FUNCTION ErrorMessage( e )
|
||||
ENDIF
|
||||
|
||||
// add either filename or operation
|
||||
IF !Empty( e:filename )
|
||||
IF ! Empty( e:filename )
|
||||
cMessage += ": " + e:filename
|
||||
|
||||
ELSEIF !Empty( e:operation )
|
||||
ELSEIF ! Empty( e:operation )
|
||||
cMessage += ": " + e:operation
|
||||
|
||||
ENDIF
|
||||
|
||||
@@ -289,7 +289,7 @@ PROCEDURE htmlBrowseSql( oHtm, cAction, lUseLinks, cTarget, oServer, oQuery )
|
||||
oHtm:EndTableCell()
|
||||
NEXT
|
||||
oHtm:endTableRow()
|
||||
IF !oquery:Eof()
|
||||
IF ! oquery:Eof()
|
||||
oquery:skip()
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ FUNCTION sprintf( ... )
|
||||
CASE "f"
|
||||
CASE "i"
|
||||
xVal := aPar[ nPar++ ]
|
||||
IF !HB_ISNUMERIC( xVal )
|
||||
IF ! HB_ISNUMERIC( xVal )
|
||||
xVal := 0
|
||||
ENDIF
|
||||
IF nLen != 0
|
||||
|
||||
@@ -124,7 +124,7 @@ METHOD New( cInBuffer ) CLASS TCgi
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::Query_String )
|
||||
IF ! Empty( ::Query_String )
|
||||
|
||||
::aQueryFields := {}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ FUNCTION xhb_setTraceFile( xFile, lAppend )
|
||||
|
||||
IF HB_ISSTRING( xFile )
|
||||
s_cSET_TRACEFILE := xFile
|
||||
IF !HB_ISLOGICAL( lAppend ) .OR. !lAppend
|
||||
IF ! HB_ISLOGICAL( lAppend ) .OR. ! lAppend
|
||||
FClose( FCreate( s_cSET_TRACEFILE ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -126,7 +126,7 @@ FUNCTION TraceLog( ... )
|
||||
cFile := Set( _SET_TRACEFILE )
|
||||
nLevel := Set( _SET_TRACESTACK )
|
||||
#else
|
||||
IF !s_lSET_TRACE
|
||||
IF ! s_lSET_TRACE
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ METHOD New( xElem, nStyle ) CLASS TXmlDocument
|
||||
ELSE
|
||||
::Read( xElem, nStyle )
|
||||
ENDIF
|
||||
IF !Empty( ::oRoot:oChild ) .AND. ::oRoot:oChild:cName == "xml"
|
||||
IF ! Empty( ::oRoot:oChild ) .AND. ::oRoot:oChild:cName == "xml"
|
||||
::cHeader := "<=xml " + ::oRoot:oChild:cData + "?>"
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
@@ -163,7 +163,7 @@ STATIC FUNCTION xhb_DefError( oError )
|
||||
ENDDO
|
||||
|
||||
cMessage := ErrorMessage( oError )
|
||||
IF !Empty( oError:osCode )
|
||||
IF ! Empty( oError:osCode )
|
||||
cDOSError := "(DOS Error " + hb_ntos( oError:osCode ) + ")"
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ METHOD Edit() CLASS XHB_TMemoEditor
|
||||
|
||||
nNextKey := 0
|
||||
|
||||
DO WHILE !::lExitEdit
|
||||
DO WHILE ! ::lExitEdit
|
||||
|
||||
IF nNextKey == 0
|
||||
nKey := Inkey( 0 )
|
||||
@@ -219,8 +219,8 @@ METHOD Edit() CLASS XHB_TMemoEditor
|
||||
AScan( ::aAsciiKeys, nKey ) > 0 .OR. ;
|
||||
AScan( ::aConfigurableKeys, nKey ) > 0 .OR. ;
|
||||
AScan( ::aExtKeys, nKey ) > 0 .OR. ;
|
||||
( nKey == K_INS .AND. !::ExistUdf() ) .OR. ;
|
||||
( nKey == K_ESC .AND. !::ExistUdf() ) )
|
||||
( nKey == K_INS .AND. ! ::ExistUdf() ) .OR. ;
|
||||
( nKey == K_ESC .AND. ! ::ExistUdf() ) )
|
||||
|
||||
::Super:Edit( nKey )
|
||||
|
||||
@@ -307,7 +307,7 @@ METHOD HandleUdf( nKey, nUdfReturn, lEdited ) CLASS XHB_TMemoEditor
|
||||
|
||||
// HBEditor is not able to handle keys with a value higher than 256 or lower than 1
|
||||
//
|
||||
IF !lEdited .AND. ;
|
||||
IF ! lEdited .AND. ;
|
||||
( AScan( ::aAsciiKeys, nKey ) > 0 .OR. ;
|
||||
AScan( { K_ALT_W, K_CTRL_W }, nKey ) > 0 .OR. ;
|
||||
AScan( ::aExtKeys, nKey ) > 0 .OR. ;
|
||||
@@ -328,7 +328,7 @@ METHOD HandleUdf( nKey, nUdfReturn, lEdited ) CLASS XHB_TMemoEditor
|
||||
|
||||
CASE ME_DATA // (33)
|
||||
|
||||
IF !lEdited .AND. ;
|
||||
IF ! lEdited .AND. ;
|
||||
( AScan( ::aAsciiKeys, nKey ) > 0 .OR. ;
|
||||
AScan( ::aExtKeys, nKey ) > 0 .OR. ;
|
||||
nKey == K_ESC .OR. ;
|
||||
@@ -437,43 +437,43 @@ FUNCTION xhb_MemoEdit( ;
|
||||
|
||||
// 2006/JUL/22 - E.F. Check argument types.
|
||||
//
|
||||
IF !HB_ISNIL( cString ) .AND. ! HB_ISSTRING( cString ) .AND. ! HB_ISMEMO( cString )
|
||||
IF ! HB_ISNIL( cString ) .AND. ! HB_ISSTRING( cString ) .AND. ! HB_ISMEMO( cString )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<cString> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nTop ) .AND. !HB_ISNUMERIC( nTop )
|
||||
IF ! HB_ISNIL( nTop ) .AND. ! HB_ISNUMERIC( nTop )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nTop> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nLeft ) .AND. !HB_ISNUMERIC( nLeft )
|
||||
IF ! HB_ISNIL( nLeft ) .AND. ! HB_ISNUMERIC( nLeft )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nLeft> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nRight ) .AND. !HB_ISNUMERIC( nRight )
|
||||
IF ! HB_ISNIL( nRight ) .AND. ! HB_ISNUMERIC( nRight )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nRight> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nBottom ) .AND. !HB_ISNUMERIC( nBottom )
|
||||
IF ! HB_ISNIL( nBottom ) .AND. ! HB_ISNUMERIC( nBottom )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nBottom> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( lEditMode ) .AND. !HB_ISLOGICAL( lEditMode )
|
||||
IF ! HB_ISNIL( lEditMode ) .AND. ! HB_ISLOGICAL( lEditMode )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<lEditMode> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( xUDF ) .AND. ( !HB_ISSTRING( xUDF ) .AND. !HB_ISLOGICAL( xUDF ) )
|
||||
IF ! HB_ISNIL( xUDF ) .AND. ! HB_ISSTRING( xUDF ) .AND. ! HB_ISLOGICAL( xUDF )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<cUserFunction> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nLineLength ) .AND. !HB_ISNUMERIC( nLineLength )
|
||||
IF ! HB_ISNIL( nLineLength ) .AND. ! HB_ISNUMERIC( nLineLength )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nLineLength> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nTabSize ) .AND. !HB_ISNUMERIC( nTabSize )
|
||||
IF ! HB_ISNIL( nTabSize ) .AND. ! HB_ISNUMERIC( nTabSize )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nTabSize> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nTextBuffRow ) .AND. !HB_ISNUMERIC( nTextBuffRow )
|
||||
IF ! HB_ISNIL( nTextBuffRow ) .AND. ! HB_ISNUMERIC( nTextBuffRow )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nTextBuffRow> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nTextBuffColumn ) .AND. !HB_ISNUMERIC( nTextBuffColumn )
|
||||
IF ! HB_ISNIL( nTextBuffColumn ) .AND. ! HB_ISNUMERIC( nTextBuffColumn )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nTextBuffColumn> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nWindowRow ) .AND. !HB_ISNUMERIC( nWindowRow )
|
||||
IF ! HB_ISNIL( nWindowRow ) .AND. ! HB_ISNUMERIC( nWindowRow )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nWindowRow> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
IF !HB_ISNIL( nWindowColumn ) .AND. !HB_ISNUMERIC( nWindowColumn )
|
||||
IF ! HB_ISNIL( nWindowColumn ) .AND. ! HB_ISNUMERIC( nWindowColumn )
|
||||
Throw( ErrorNew( "BASE", 0, 1127, "<nWindowColumn> Argument type error", ProcName() ) )
|
||||
ENDIF
|
||||
|
||||
@@ -508,7 +508,7 @@ FUNCTION xhb_MemoEdit( ;
|
||||
|
||||
// 2006/AUG/06 - E.F. Clipper's <cUserFunction> in .T. or. F. is samething.
|
||||
//
|
||||
IF !HB_ISLOGICAL( xUDF ) // .OR. cUserFunction
|
||||
IF ! HB_ISLOGICAL( xUDF ) // .OR. cUserFunction
|
||||
|
||||
oEd:Edit()
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS
|
||||
|
||||
// 2006/AUG/18 - E.F. Adjusted nLineLenght in accordance with Clipper's
|
||||
// memoedit.
|
||||
IF !HB_ISNUMERIC( nLineLength )
|
||||
IF ! HB_ISNUMERIC( nLineLength )
|
||||
nLineLength := ::nNumCols
|
||||
ELSE
|
||||
IF nLineLength < 0
|
||||
@@ -941,7 +941,7 @@ METHOD Edit( nPassedKey ) CLASS XHBEditor
|
||||
// 2006/JUL/22 - E.F. - Insert is allowed only in edit mode.
|
||||
IF ::lEditAllow
|
||||
::ClrTextSelection()
|
||||
::InsertState( !::lInsert )
|
||||
::InsertState( ! ::lInsert )
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
@@ -1200,7 +1200,7 @@ METHOD WordRight() CLASS XHBEditor
|
||||
// NOTE: should be faster without call to ::GetLine()
|
||||
//
|
||||
|
||||
IF !::lWordWrap .AND. ::IsEmptyLine( ::nRow ) .OR. ;
|
||||
IF ! ::lWordWrap .AND. ::IsEmptyLine( ::nRow ) .OR. ;
|
||||
::LastRow() == 0 .OR. ;
|
||||
( At( " ", ::aText[ ::nRow ]:cText ) == 0 .AND. ::LineLen( ::nRow ) >= ::nWordWrapCol )
|
||||
RETURN self
|
||||
@@ -1214,10 +1214,10 @@ METHOD WordRight() CLASS XHBEditor
|
||||
// rightmost position.
|
||||
//
|
||||
|
||||
DO while ::nCol <= nMaxCol .AND. !Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
DO while ::nCol <= nMaxCol .AND. ! Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Right()
|
||||
IF ::nCol > nMaxCol .OR. ;
|
||||
( !::lWordWrap .AND. ::nCol >= nMaxCol )
|
||||
( ! ::lWordWrap .AND. ::nCol >= nMaxCol )
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
@@ -1225,13 +1225,13 @@ METHOD WordRight() CLASS XHBEditor
|
||||
DO while ::nCol <= nMaxCol .AND. Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Right()
|
||||
IF ::nCol > nMaxCol .OR. ;
|
||||
( !::lWordWrap .AND. ::nCol >= nMaxCol )
|
||||
( ! ::lWordWrap .AND. ::nCol >= nMaxCol )
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
IF !::lWordWrap
|
||||
DO while ::nCol > 1 .AND. !Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
IF ! ::lWordWrap
|
||||
DO while ::nCol > 1 .AND. ! Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Left()
|
||||
ENDDO
|
||||
DO while ::nCol < nMaxCol .AND. Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
@@ -1255,7 +1255,7 @@ METHOD WordRight() CLASS XHBEditor
|
||||
// 2006/JUL/21 - E.F. - If cursor stop at empty char and it is the
|
||||
// last reachable position go back to the previous word.
|
||||
ELSEIF ::nCol >= nMaxCol .AND. ::nRow == ::LastRow()
|
||||
IF !Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
IF ! Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::end()
|
||||
ENDIF
|
||||
::WordLeft()
|
||||
@@ -1312,7 +1312,7 @@ METHOD WordLeft() CLASS XHBEditor
|
||||
// modifed to wrap lines and position at first letter of word, not word end
|
||||
//
|
||||
|
||||
IF !::lWordWrap .AND. ::IsEmptyLine( ::nRow ) .OR. ::LastRow() == 0
|
||||
IF ! ::lWordWrap .AND. ::IsEmptyLine( ::nRow ) .OR. ::LastRow() == 0
|
||||
RETURN self
|
||||
ENDIF
|
||||
|
||||
@@ -1323,7 +1323,7 @@ METHOD WordLeft() CLASS XHBEditor
|
||||
::End()
|
||||
DO while ::nCol == 1 .AND. ::nRow > 1 .AND. Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Up()
|
||||
IF !::IsEmptyLine( ::nRow )
|
||||
IF ! ::IsEmptyLine( ::nRow )
|
||||
::End()
|
||||
EXIT
|
||||
ENDIF
|
||||
@@ -1334,19 +1334,19 @@ METHOD WordLeft() CLASS XHBEditor
|
||||
// 2006/JUL/21 - E.F. - Changed to verifiy empty char instead space. In any
|
||||
// circunstancies wordleft stop at space.
|
||||
//
|
||||
DO while ::nCol > 1 .AND. !Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
DO while ::nCol > 1 .AND. ! Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Left()
|
||||
ENDDO
|
||||
DO while ::nCol > 1 .AND. Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::Left()
|
||||
ENDDO
|
||||
DO while ::nCol > 1 .AND. !Empty( ::GetCol( ::nRow, ::nCol - 1 ) ) // move to front of word
|
||||
DO while ::nCol > 1 .AND. ! Empty( ::GetCol( ::nRow, ::nCol - 1 ) ) // move to front of word
|
||||
::Left()
|
||||
ENDDO
|
||||
|
||||
// 2006/JUL/24 -E.F. - If cursor stoped at empty char, then
|
||||
// go to the next word.
|
||||
IF !::lWordWrap .AND. ;
|
||||
IF ! ::lWordWrap .AND. ;
|
||||
::nCol < ::LineLen( ::nRow ) .AND. ;
|
||||
Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::WordRight()
|
||||
@@ -1356,7 +1356,7 @@ METHOD WordLeft() CLASS XHBEditor
|
||||
ELSEIF ::lWordWrap .AND. ::nCol == 1 .AND. ::nRow > 1
|
||||
DO While ::nCol == 1 .AND. ::nRow > 1 .AND. Empty( ::GetCol( ::nRow, ::nCol ) )
|
||||
::up()
|
||||
IF !::IsEmptyLine( ::nRow )
|
||||
IF ! ::IsEmptyLine( ::nRow )
|
||||
::end()
|
||||
::wordLeft()
|
||||
EXIT
|
||||
@@ -1414,7 +1414,7 @@ METHOD K_Mouse( nKey ) CLASS XHBEditor
|
||||
|
||||
METHOD K_Ascii( nKey ) CLASS XHBEditor
|
||||
|
||||
IF !::lEditAllow .OR. ::nCol > ::nWordWrapCol + 1
|
||||
IF ! ::lEditAllow .OR. ::nCol > ::nWordWrapCol + 1
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -1460,7 +1460,7 @@ METHOD K_Ascii( nKey ) CLASS XHBEditor
|
||||
|
||||
METHOD K_Bs() CLASS XHBEditor
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
::Left()
|
||||
RETURN Self
|
||||
ENDIF
|
||||
@@ -1506,7 +1506,7 @@ METHOD K_Bs() CLASS XHBEditor
|
||||
::nCol := Min( ::nCol + 1, ::nWordWrapCol + 1 )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::aText[ ::nRow ]:cText )
|
||||
IF ! Empty( ::aText[ ::nRow ]:cText )
|
||||
::GotoPos( ::nRow, ::nCol, .T. ) // also refresh
|
||||
ELSE
|
||||
::GotoPos( ::nRow, 1, .T. )
|
||||
@@ -1546,7 +1546,7 @@ METHOD K_Del() CLASS XHBEditor
|
||||
LOCAL lMerge := .F.
|
||||
LOCAL nCurRow, nCurCol
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -1617,7 +1617,7 @@ METHOD K_Tab() CLASS XHBEditor
|
||||
|
||||
LOCAL lHardCR, i
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -1643,7 +1643,7 @@ METHOD K_Tab() CLASS XHBEditor
|
||||
lHardCR := .F. // should already by .F., but just to be safe, and it is a tiny line of code...
|
||||
|
||||
IF ::aText[ ::nRow ]:lSoftCR
|
||||
IF !::aText[ ::nRow + 1 ]:lSoftCR // the next line has a hard return, keep it
|
||||
IF ! ::aText[ ::nRow + 1 ]:lSoftCR // the next line has a hard return, keep it
|
||||
lHardCR := .T.
|
||||
ENDIF
|
||||
|
||||
@@ -1667,7 +1667,7 @@ METHOD K_Tab() CLASS XHBEditor
|
||||
|
||||
METHOD K_Return() CLASS XHBEditor
|
||||
|
||||
IF ::LastRow() == 0 .AND. !::lInsert
|
||||
IF ::LastRow() == 0 .AND. ! ::lInsert
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -1838,7 +1838,7 @@ METHOD DelTextRight( nRow ) CLASS XHBEditor
|
||||
|
||||
__defaultNIL( @nRow, ::nRow )
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -1862,7 +1862,7 @@ METHOD DelWordRight() CLASS XHBEditor
|
||||
nCutCol := 0
|
||||
nCol := ::nCol
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -2414,7 +2414,7 @@ METHOD GetTextSelection( lSoftCr ) CLASS XHBEditor
|
||||
|
||||
__defaultNIL( @lSoftCr, .F. )
|
||||
|
||||
IF !::lSelActive
|
||||
IF ! ::lSelActive
|
||||
RETURN cString
|
||||
ENDIF
|
||||
|
||||
@@ -2449,7 +2449,7 @@ METHOD GetTextSelection( lSoftCr ) CLASS XHBEditor
|
||||
|
||||
METHOD SetTextSelection( cAction, nCount ) CLASS XHBEditor
|
||||
|
||||
IF !::lSelActive
|
||||
IF ! ::lSelActive
|
||||
|
||||
::lSelActive := .T.
|
||||
|
||||
@@ -2567,7 +2567,7 @@ METHOD SetTextSelection( cAction, nCount ) CLASS XHBEditor
|
||||
/* 2006/SEP/17 - E.F. - At this point we need add a new line
|
||||
to be able to select the last row.
|
||||
*/
|
||||
IF !Empty( ::aText[ ::nRowSelEnd ]:cText )
|
||||
IF ! Empty( ::aText[ ::nRowSelEnd ]:cText )
|
||||
::AddLine()
|
||||
ELSE
|
||||
::nRowSelEnd := ::LastRow() - 1
|
||||
@@ -2709,7 +2709,7 @@ METHOD ClrTextSelection() CLASS XHBEditor
|
||||
|
||||
METHOD DelText() CLASS XHBEditor
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN self
|
||||
ENDIF
|
||||
|
||||
@@ -2736,7 +2736,7 @@ METHOD DelTextSelection() CLASS XHBEditor
|
||||
LOCAL nI
|
||||
LOCAL cText
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -2805,19 +2805,19 @@ METHOD AddText( cString, lAtPos ) CLASS XHBEditor
|
||||
LOCAL nAtRow
|
||||
LOCAL lSaveIns
|
||||
|
||||
IF !::lEditAllow
|
||||
IF ! ::lEditAllow
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
|
||||
IF !Empty( cString )
|
||||
IF ! Empty( cString )
|
||||
|
||||
aTmpText := Text2Array( cString, iif( ::lWordWrap, ::nNumCols, NIL ) )
|
||||
nLines := Len( aTmpText )
|
||||
nAtRow := ::nRow
|
||||
lSaveIns := ::lInsert
|
||||
|
||||
IF !lSaveIns
|
||||
IF ! lSaveIns
|
||||
::InsertState( .T. )
|
||||
ENDIF
|
||||
|
||||
@@ -3041,7 +3041,7 @@ STATIC FUNCTION Text2Array( cString, nWordWrapCol )
|
||||
|
||||
ENDDO
|
||||
// If string ends with EOL delimeters we have to add it here.
|
||||
IF !lTokenized .AND. Right( cString, nEOLLen ) == cEOL
|
||||
IF ! lTokenized .AND. Right( cString, nEOLLen ) == cEOL
|
||||
AAdd( aArray, HBTextLine():New( , .F. ) )
|
||||
ENDIF
|
||||
|
||||
@@ -3058,7 +3058,6 @@ METHOD BrowseText( nPassedKey, lHandleOneKey ) CLASS XHBEditor
|
||||
|
||||
__defaultNIL( @lHandleOneKey, .F. )
|
||||
|
||||
|
||||
DO WHILE ! ::lExitEdit
|
||||
|
||||
// If I haven't been called with a key already preset, evaluate this key and then exit
|
||||
|
||||
@@ -118,7 +118,7 @@ FUNCTION SP_Add( cWord )
|
||||
// *DEBUG**
|
||||
@ 24, 30 SAY "At SP_ADD"
|
||||
|
||||
IF SP_Init() .AND. !Empty( AUXILIARY_DICTIONARY )
|
||||
IF SP_Init() .AND. ! Empty( AUXILIARY_DICTIONARY )
|
||||
cWord := Upper( AllTrim( cWord ) )
|
||||
|
||||
//
|
||||
@@ -249,7 +249,7 @@ FUNCTION SP_Check( cWord )
|
||||
|
||||
#endif
|
||||
|
||||
IF !Empty( x )
|
||||
IF ! Empty( x )
|
||||
IF !( cLast == SubStr( cLookup, 1, 2 ) )
|
||||
cBuf := Space( y )
|
||||
FSeek( nHandle, x, FS_SET )
|
||||
@@ -289,7 +289,7 @@ FUNCTION SP_Check( cWord )
|
||||
ELSE
|
||||
ok := .F.
|
||||
ENDIF
|
||||
IF !ok .AND. EXTRA_CODE_BLOCK != NIL
|
||||
IF ! ok .AND. EXTRA_CODE_BLOCK != NIL
|
||||
ok := Eval( EXTRA_CODE_BLOCK, cWord )
|
||||
ENDIF
|
||||
|
||||
@@ -317,7 +317,7 @@ STATIC FUNCTION sp_GetBuf( cLetters )
|
||||
|
||||
IF ( nRow > 0 .AND. nRow <= 26 ) .AND. ( nCol > 0 .AND. nCol <= 26 )
|
||||
x := Bin2L( SubStr( cOffsets, ( ( nRow - 1 ) * 156 ) + ( ( nCol - 1 ) * EACH_WORD + 1 ), 4 ) )
|
||||
IF !Empty( x )
|
||||
IF ! Empty( x )
|
||||
y := Bin2W( SubStr( cOffsets, ( ( nRow - 1 ) * 156 ) + ( ( nCol - 1 ) * EACH_WORD + 5 ), 2 ) )
|
||||
cBuf := Space( y )
|
||||
FSeek( nHandle, x + 4, FS_SET )
|
||||
@@ -397,7 +397,7 @@ FUNCTION Sp_LoadAux( cFile )
|
||||
// *DEBUG**
|
||||
@ 24, 30 SAY "At SP_loadaux"
|
||||
|
||||
IF !Empty( cFile )
|
||||
IF ! Empty( cFile )
|
||||
IF File( cFile )
|
||||
x := FOpen( cFile, FO_READ + FO_DENYNONE )
|
||||
ELSE
|
||||
@@ -521,7 +521,7 @@ FUNCTION Sp_Suggest( cWord, lInclude )
|
||||
|
||||
IF "'" $ cWord
|
||||
cHold := SP_Expand( cWord )
|
||||
IF !Empty( cHold )
|
||||
IF ! Empty( cHold )
|
||||
AAdd( aRet_, "A1AA" + cHold )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1118,7 +1118,7 @@ FUNCTION Sp_init
|
||||
aGlobal[ 2 ] += cOther
|
||||
isok := .T.
|
||||
ENDIF
|
||||
IF !Empty( AUXILIARY_DICTIONARY )
|
||||
IF ! Empty( AUXILIARY_DICTIONARY )
|
||||
SP_LoadAux( AUXILIARY_DICTIONARY )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1127,13 +1127,15 @@ FUNCTION Sp_init
|
||||
ENDIF
|
||||
|
||||
// * Thesaurus comented out as not needed
|
||||
// if !empty( THESAURUS_NAME )
|
||||
// if file( DICTIONARY_PATH+THESAURUS_NAME )
|
||||
// SP_OpenThes( DICTIONARY_PATH+THESAURUS_NAME )
|
||||
// elseif file( THESAURUS_NAME )
|
||||
// SP_OpenThes( THESAURUS_NAME )
|
||||
// endif
|
||||
// endif
|
||||
#if 0
|
||||
IF ! Empty( THESAURUS_NAME )
|
||||
IF File( DICTIONARY_PATH + THESAURUS_NAME )
|
||||
SP_OpenThes( DICTIONARY_PATH + THESAURUS_NAME )
|
||||
ELSEIF File( THESAURUS_NAME )
|
||||
SP_OpenThes( THESAURUS_NAME )
|
||||
ENDIF
|
||||
ENDIF
|
||||
#endif
|
||||
|
||||
ENDIF
|
||||
|
||||
@@ -1197,7 +1199,7 @@ FUNCTION DBF2Dic( cDbf, cDictionary, lTalk )
|
||||
cDBF += ".DBF"
|
||||
ENDIF
|
||||
|
||||
IF !File( cDBF )
|
||||
IF ! File( cDBF )
|
||||
RETURN -1
|
||||
ENDIF
|
||||
|
||||
@@ -1248,17 +1250,17 @@ FUNCTION DBF2Dic( cDbf, cDictionary, lTalk )
|
||||
FWrite( nH, "JJ" + L2Bin( NSIZE + 4 ) + Replicate( Chr( 0 ), NSIZE ) + Space( 10 ), NSIZE + 16 )
|
||||
|
||||
FOR i := 1 TO 26
|
||||
DO WHILE SubStr( DICT->word, 1, 1 ) == Chr( i + 64 ) .AND. !Eof()
|
||||
DO WHILE SubStr( DICT->word, 1, 1 ) == Chr( i + 64 ) .AND. ! Eof()
|
||||
FOR j := 1 TO 26
|
||||
temp := ""
|
||||
cBits := FOUR_BYTES
|
||||
DO WHILE !IsAlpha( SubStr( DICT->word, 2, 1 ) ) .AND. !Eof()
|
||||
DO WHILE ! IsAlpha( SubStr( DICT->word, 2, 1 ) ) .AND. ! Eof()
|
||||
IF Len( AllTrim( DICT->word ) ) > 0
|
||||
cOther += "|" + AllTrim( DICT->word )
|
||||
ENDIF
|
||||
skip + 1
|
||||
ENDDO
|
||||
DO WHILE SubStr( DICT->word, 2, 1 ) == Chr( j + 64 ) .AND. !Eof()
|
||||
DO WHILE SubStr( DICT->word, 2, 1 ) == Chr( j + 64 ) .AND. ! Eof()
|
||||
IF Len( RTrim( DICT->word ) ) = 3
|
||||
Bit( cBits, Asc( SubStr( DICT->word, 3, 1 ) ) -64, .T. )
|
||||
ELSEIF Len( RTrim( DICT->word ) ) == 2
|
||||
@@ -1272,7 +1274,7 @@ FUNCTION DBF2Dic( cDbf, cDictionary, lTalk )
|
||||
@ 10, 41 say ( nCurRec / nSize ) * 100 PICTURE "999.9%" COLOR "W+/R"
|
||||
ENDIF
|
||||
ENDDO
|
||||
IF !Empty( temp ) .OR. cBits != FOUR_BYTES
|
||||
IF ! Empty( temp ) .OR. cBits != FOUR_BYTES
|
||||
|
||||
nWhere := FSeek( nH, 0, FS_END )
|
||||
|
||||
@@ -1287,7 +1289,7 @@ FUNCTION DBF2Dic( cDbf, cDictionary, lTalk )
|
||||
j := FSeek( nH, 0, FS_END )
|
||||
FSeek( nH, 2, FS_SET )
|
||||
FWrite( nH, L2Bin( j ), 4 )
|
||||
IF !Empty( cOther )
|
||||
IF ! Empty( cOther )
|
||||
FSeek( nH, j, FS_SET )
|
||||
cOther += "|"
|
||||
FWrite( nH, cOther, Len( cOther ) )
|
||||
@@ -1351,7 +1353,7 @@ FUNCTION DIC2DBF( cDictionary, cDBF, lTalk )
|
||||
lTalk := .F.
|
||||
ENDIF
|
||||
|
||||
IF !File( cDictionary )
|
||||
IF ! File( cDictionary )
|
||||
RETURN -1
|
||||
ENDIF
|
||||
|
||||
@@ -1361,7 +1363,7 @@ FUNCTION DIC2DBF( cDictionary, cDBF, lTalk )
|
||||
// Read the dictionary file
|
||||
//
|
||||
|
||||
IF !SP_Init()
|
||||
IF ! SP_Init()
|
||||
RETURN -2
|
||||
ENDIF
|
||||
//
|
||||
@@ -1405,7 +1407,7 @@ FUNCTION DIC2DBF( cDictionary, cDBF, lTalk )
|
||||
FOR j := 1 TO 26
|
||||
temp := Chr( i + 64 ) + Chr( j + 64 )
|
||||
x := Bin2L( SubStr( cOffsets, ( ( i - 1 ) * 156 ) + ( ( j - 1 ) * EACH_WORD + 1 ), 4 ) )
|
||||
IF !Empty( x )
|
||||
IF ! Empty( x )
|
||||
y := Bin2W( SubStr( cOffsets, ( ( i - 1 ) * 156 ) + ( ( j - 1 ) * EACH_WORD + 5 ), 2 ) )
|
||||
|
||||
IF lTalk
|
||||
@@ -1428,7 +1430,7 @@ FUNCTION DIC2DBF( cDictionary, cDBF, lTalk )
|
||||
ENDIF
|
||||
cBuf := SubStr( cBuf, 5 )
|
||||
z := 1
|
||||
DO WHILE !Empty( cBuf )
|
||||
DO WHILE ! Empty( cBuf )
|
||||
IF SubStr( cBuf, z, 1 ) >= Chr( 128 )
|
||||
cWord := SubStr( cBuf, 1, z )
|
||||
APPEND BLANK
|
||||
@@ -1445,7 +1447,7 @@ FUNCTION DIC2DBF( cDictionary, cDBF, lTalk )
|
||||
z++
|
||||
ENDIF
|
||||
ENDDO
|
||||
IF !Empty( cWord )
|
||||
IF ! Empty( cWord )
|
||||
ENDIF
|
||||
cWord := ""
|
||||
ENDIF
|
||||
|
||||
@@ -114,7 +114,7 @@ STATIC FUNCTION CBhandler( nWinNum, nId, nEvent, nIndex, nPBid )
|
||||
wvw_pbEnable( nWinNum, nPBid, .F. )
|
||||
ENDIF
|
||||
CASE nEvent == 1 // CBN_SELCHANGE
|
||||
IF !wvw_cbIsDropped( nWinNum, nId )
|
||||
IF ! wvw_cbIsDropped( nWinNum, nId )
|
||||
// nIndex is 0-based
|
||||
IF nIndex == 0
|
||||
wvw_pbEnable( nWinNum, nPBid, .T. )
|
||||
|
||||
@@ -140,7 +140,7 @@ FUNCTION CBhandler( nWinNum, nId, nEvent, nIndex, cVar, GetList )
|
||||
CASE nEvent == 3 // CBN_SETFOCUS
|
||||
i := AScan( GetList, {| x | x:Name == cVar } )
|
||||
IF i > 0
|
||||
/* !oGet:HasFocus means
|
||||
/* ! oGet:HasFocus means
|
||||
* CBN_SETFOCUS was NOT initiated from mouseclick
|
||||
* then we don't need to bother about setting focus to the
|
||||
* new GET. GetSys has already done that via CBreader().
|
||||
@@ -203,7 +203,7 @@ FUNCTION CBreader( oGet )
|
||||
LOCAL nSelected, cSelected
|
||||
LOCAL oGetList := __GetListActive()
|
||||
|
||||
IF !wvw_cbIsFocused( NIL, oGet:cargo )
|
||||
IF ! wvw_cbIsFocused( NIL, oGet:cargo )
|
||||
wvw_cbSetFocus( NIL, oGet:cargo )
|
||||
ENDIF
|
||||
|
||||
@@ -243,7 +243,7 @@ FUNCTION CBreader( oGet )
|
||||
|
||||
ELSEIF nKey == K_LBUTTONDOWN .OR. nKey == K_LDBLCLK
|
||||
// is there any GET object hit?
|
||||
IF !Empty( HitTest( oGetList:aGetList, MRow(), MCol(), NIL ) )
|
||||
IF ! Empty( HitTest( oGetList:aGetList, MRow(), MCol(), NIL ) )
|
||||
oGet:exitState := GE_MOUSEHIT
|
||||
ELSE
|
||||
oGet:exitState := GE_NOEXIT
|
||||
|
||||
@@ -214,13 +214,13 @@ METHOD New( nWinNum, nType, cId, nRow1, nCol1, nRow2, nCol2, aOffTLBR, lTransp )
|
||||
|
||||
METHOD Draw() CLASS wPaintObj
|
||||
|
||||
IF !::lVisible
|
||||
IF ! ::lVisible
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
DO CASE
|
||||
case ::nType == WPAINTOBJ_IMAGE
|
||||
IF !Empty( ::cImage )
|
||||
IF ! Empty( ::cImage )
|
||||
WVW_DRAWIMAGE( ::nWinNum, ::nRow1, ::nCol1, ::nRow2, ::nCol2, ;
|
||||
::cImage, ::aOffTLBR, ::lTransp )
|
||||
ENDIF
|
||||
|
||||
@@ -87,7 +87,7 @@ PROCEDURE Main()
|
||||
wvw_showwindow( 0 )
|
||||
|
||||
// wait until user click the close button
|
||||
DO WHILE !lClosepermitted
|
||||
DO WHILE ! lClosepermitted
|
||||
Inkey( 0.2 )
|
||||
ENDDO
|
||||
SetKey( K_F8, bSetKey )
|
||||
@@ -254,7 +254,7 @@ PROCEDURE EBReadGets( nwinnum, aEBGets )
|
||||
nmincol := 99999
|
||||
FOR i := 1 TO nNumGets
|
||||
lmultiline := aEBGets[ i ][ __GET_LMULTILINE ]
|
||||
IF !lmultiline
|
||||
IF ! lmultiline
|
||||
nlen := Len( aEBGets[ i ][ __GET_CPICT ] )
|
||||
ELSE
|
||||
nlen := 30
|
||||
@@ -303,7 +303,7 @@ PROCEDURE EBReadGets( nwinnum, aEBGets )
|
||||
wvw_ebsetfocus( nwinnum, aEBGets[ 1 ][ __GET_NEBID ] )
|
||||
nFocus := 1
|
||||
ch := Inkey( 0.5 )
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
IF HB_ISBLOCK( SetKey( ch ) )
|
||||
Eval( SetKey( ch ) )
|
||||
ELSEIF ch != 0
|
||||
@@ -322,7 +322,7 @@ PROCEDURE EBReadGets( nwinnum, aEBGets )
|
||||
nFocus := nNumGets + 2
|
||||
ENDIF
|
||||
OTHERWISE
|
||||
lchangefocus := .F. // !wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID])
|
||||
lchangefocus := .F. // ! wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID])
|
||||
ENDCASE
|
||||
IF lchangefocus
|
||||
IF nFocus <= nNumGets
|
||||
@@ -348,7 +348,7 @@ PROCEDURE EBReadGets( nwinnum, aEBGets )
|
||||
|
||||
lClosepermitted := ( nwinnum == wvw_nnumwindows() - 1 )
|
||||
// wait until user click the close button
|
||||
DO WHILE !lClosepermitted
|
||||
DO WHILE ! lClosepermitted
|
||||
Inkey( 0.5 )
|
||||
ENDDO
|
||||
|
||||
@@ -376,7 +376,7 @@ STATIC PROCEDURE InpKeyHandler( nwinnum, ch, aEBGets, nOKbutton, nCancelbutton )
|
||||
ENDIF
|
||||
lchangefocus := .T.
|
||||
DO CASE
|
||||
CASE ch == K_TAB .AND. !lShiftPressed()
|
||||
CASE ch == K_TAB .AND. ! lShiftPressed()
|
||||
IF nFocus < ( nNumGets + 2 ) // incl buttons
|
||||
nFocus++
|
||||
ELSE
|
||||
@@ -562,7 +562,7 @@ STATIC FUNCTION MaskEditBox( nWinNum, nId, nEvent, aEBGets )
|
||||
|
||||
DO CASE
|
||||
CASE nEvent == EN_KILLFOCUS
|
||||
IF !mlmultiline .AND. mcvaltype $ "ND"
|
||||
IF ! mlmultiline .AND. mcvaltype $ "ND"
|
||||
ctext := wvw_ebgettext( nwinnum, nid )
|
||||
IF mcvaltype == "D" .AND. IsBadDate( ctext )
|
||||
// don't leave it in an invalid state
|
||||
@@ -572,7 +572,7 @@ STATIC FUNCTION MaskEditBox( nWinNum, nId, nEvent, aEBGets )
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE nEvent == EN_SETFOCUS
|
||||
IF !mlmultiline .AND. mcvaltype == "N"
|
||||
IF ! mlmultiline .AND. mcvaltype == "N"
|
||||
ctext := wvw_ebgettext( nwinnum, nid )
|
||||
wvw_ebsettext( nwinnum, nId, Transform( GetValFromText( ctext, mcvaltype ), GetNumMask( mcpict, mcvaltype ) ) )
|
||||
ENDIF
|
||||
@@ -583,7 +583,7 @@ STATIC FUNCTION MaskEditBox( nWinNum, nId, nEvent, aEBGets )
|
||||
ENDIF
|
||||
aEBGets[ nIndex ][ __GET_LFOCUSED ] := .T.
|
||||
CASE nEvent == EN_CHANGE
|
||||
IF !mlmultiline
|
||||
IF ! mlmultiline
|
||||
ProcessCharMask( nwinnum, nId, mcvaltype, mcpict )
|
||||
ENDIF
|
||||
ENDCASE
|
||||
@@ -664,7 +664,7 @@ STATIC PROCEDURE ProcessCharMask( mnwinnum, mnebid, mcvaltype, mcpict )
|
||||
InBufferRight := Right( InBuffer, Len( InBuffer ) - icp )
|
||||
|
||||
IF CharMaskTekstOK( InBufferLeft + " " + InBufferRight, mcvaltype, Mask ) .AND. ;
|
||||
!CharMaskTekstOK( InBufferLeft + InBufferRight, mcvaltype, Mask )
|
||||
! CharMaskTekstOK( InBufferLeft + InBufferRight, mcvaltype, Mask )
|
||||
InBuffer := InBufferLeft + " " + InBufferRight
|
||||
ELSE
|
||||
InBuffer := InBufferLeft + InBufferRight
|
||||
@@ -783,8 +783,8 @@ STATIC PROCEDURE ProcessCharMask( mnwinnum, mnebid, mcvaltype, mcpict )
|
||||
CB := SubStr( OutBuffer, icp + x, 1 )
|
||||
CM := SubStr( Mask, icp + x, 1 )
|
||||
|
||||
IF !IsDigit( CB ) .AND. !IsAlpha( CB ) .AND. ;
|
||||
( !( CB == " " ) .OR. ( CB == " " .AND. CM == " " ) )
|
||||
IF ! IsDigit( CB ) .AND. ! IsAlpha( CB ) .AND. ;
|
||||
( !( CB == " " ) .OR. ( CB == " " .AND. CM == " " ) )
|
||||
wvw_ebsetsel( mnwinnum, mnebid, icp + x, icp + x )
|
||||
ELSE
|
||||
EXIT
|
||||
|
||||
@@ -49,7 +49,7 @@ PROCEDURE Main()
|
||||
|
||||
LOCAL ch
|
||||
|
||||
IF !SetMode( 25, 80 )
|
||||
IF ! SetMode( 25, 80 )
|
||||
wvw_messagebox( 0, "Cannot set to (25,80) screen", "Warning", MB_OK + MB_ICONEXCLAMATION )
|
||||
ENDIF
|
||||
SetColor( "W*/N+" )
|
||||
|
||||
@@ -81,7 +81,7 @@ FUNCTION WVW_SIZE( nWinNum, hWnd, message, wParam, lParam )
|
||||
LOCAL lNeedReset := .F., ;
|
||||
maxsavedscrrow, maxsavedscrcol
|
||||
|
||||
IF !s_lSizeReady
|
||||
IF ! s_lSizeReady
|
||||
// program is not ready to handle window resizing
|
||||
// (or this function is currently running)
|
||||
RETURN NIL
|
||||
|
||||
@@ -71,7 +71,7 @@ PROCEDURE xGet1()
|
||||
// @ 21,21 SAY "Inside the window" COLOR "R/W"
|
||||
// @ 23,0 SAY "Outside the window" COLOR "R/W"
|
||||
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
@ 12, 22 SAY "Name : " GET cName PICT "@!K" WHEN lMessage( "Please enter your name" )
|
||||
@ 14, 22 SAY "Address : " GET cAddr PICT "@!K" WHEN lMessage( "Please enter your address" )
|
||||
@ 16, 22 SAY "Phone : " GET cPhone PICT "@K" WHEN lMessage( "Please enter your phone number" )
|
||||
@@ -127,7 +127,7 @@ FUNCTION xBrowse1()
|
||||
|
||||
nWin := znewwindow( hb_UTF8ToStrBox( "┌─┐│┘─└│" ), nTop, nLeft, nBottom, nRight, "test.dbf" )
|
||||
|
||||
WHILE !lEnd
|
||||
WHILE ! lEnd
|
||||
oBrowse:ForceStable()
|
||||
|
||||
lMessage( "Record #" + hb_ntos( RecNo() ) )
|
||||
@@ -358,7 +358,7 @@ FUNCTION ZNEWWINDOW( wtype, r1, c1, r2, c2, ctitle, ccolor )
|
||||
|
||||
// GTWVW doesn't need box or textual title
|
||||
hb_DispBox( r1, c1, r2, c2, wtype )
|
||||
IF !Empty( ctitle )
|
||||
IF ! Empty( ctitle )
|
||||
cTitle := " " + AllTrim( ctitle ) + " "
|
||||
hb_DispOutAt( r1, nCeiling( ( c2 + c1 - Len( cTitle ) ) / 2 ), cTitle )
|
||||
ENDIF
|
||||
|
||||
@@ -95,7 +95,7 @@ PROCEDURE xGet1()
|
||||
// @ 21,21 SAY "Inside the window" COLOR "R/W"
|
||||
// @ 23,0 SAY "Outside the window" COLOR "R/W"
|
||||
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
@ 12, 22 SAY "Name : " GET cName PICT "@!K" WHEN lMessage( "Please enter your name" )
|
||||
@ 14, 22 SAY "Address : " GET cAddr PICT "@!K" WHEN lMessage( "Please enter your address" )
|
||||
@ 16, 22 SAY "Phone : " GET cPhone PICT "@K" WHEN lMessage( "Please enter your phone number" )
|
||||
@@ -151,7 +151,7 @@ FUNCTION xBrowse1()
|
||||
|
||||
nWin := znewwindow( hb_UTF8ToStrBox( "┌─┐│┘─└│" ), nTop, nLeft, nBottom, nRight, "test.dbf" )
|
||||
|
||||
WHILE !lEnd
|
||||
WHILE ! lEnd
|
||||
oBrowse:ForceStable()
|
||||
|
||||
lMessage( "Record #" + hb_ntos( RecNo() ) )
|
||||
@@ -386,7 +386,7 @@ FUNCTION ZNEWWINDOW( wtype, r1, c1, r2, c2, ctitle, ccolor )
|
||||
#ifndef __GTWVW__
|
||||
// GTWVW doesn't need box or textual title
|
||||
hb_DispBox( r1, c1, r2, c2, wtype )
|
||||
IF !Empty( ctitle )
|
||||
IF ! Empty( ctitle )
|
||||
cTitle := " " + AllTrim( ctitle ) + " "
|
||||
hb_DispOutAt( r1, nCeiling( ( c2 + c1 - Len( cTitle ) ) / 2 ), cTitle )
|
||||
ENDIF
|
||||
|
||||
@@ -103,7 +103,7 @@ PROCEDURE xGet1()
|
||||
//@ 21,21 say "Inside the window" color "R/W"
|
||||
//@ 23,0 say "Outside the window" color "R/W"
|
||||
|
||||
DO WHILE !lDone
|
||||
DO WHILE ! lDone
|
||||
@ 12, 22 SAY "Name : " GET cName PICT "@!K" WHEN lMessage( "Please enter your name" )
|
||||
@ 14, 22 SAY "Address : " GET cAddr PICT "@!K" WHEN lMessage( "Please enter your address" )
|
||||
@ 16, 22 SAY "Phone : " GET cPhone PICT "@K" WHEN lMessage( "Please enter your phone number" )
|
||||
@@ -181,7 +181,7 @@ FUNCTION xBrowse1()
|
||||
AddMiscObjects( nWin, {| nWindow | WVW_DrawGridVert( nWindow, oBrowse:nTop, oBrowse:nBottom, aColumnsSep, Len( aColumnsSep ) ) } )
|
||||
#endif
|
||||
|
||||
WHILE !lEnd
|
||||
WHILE ! lEnd
|
||||
oBrowse:ForceStable()
|
||||
|
||||
lMessage( "Record #" + hb_ntos( RecNo() ) )
|
||||
@@ -428,7 +428,7 @@ FUNCTION ZNEWWINDOW( wtype, r1, c1, r2, c2, ctitle, ccolor )
|
||||
#ifndef __GTWVW__
|
||||
// GTWVW doesn't need box or textual title
|
||||
hb_DispBox( r1, c1, r2, c2, wtype )
|
||||
IF !Empty( ctitle )
|
||||
IF ! Empty( ctitle )
|
||||
cTitle := " " + AllTrim( ctitle ) + " "
|
||||
hb_DispOutAt( r1, nCeiling( ( c2 + c1 - Len( cTitle ) ) / 2 ), cTitle )
|
||||
ENDIF
|
||||
|
||||
@@ -207,7 +207,7 @@ METHOD OnPress() CLASS WVWMouseButton
|
||||
|
||||
// this is called when LEFT mouse button is pressed on the object
|
||||
LOCAL lWasPressed
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -232,7 +232,7 @@ METHOD OnClick() CLASS WVWMouseButton
|
||||
|
||||
// this is called when LEFT mouse button is clicked on the object
|
||||
// normally (or should it be restricted to be?) called from ::OnRelease()
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -246,7 +246,7 @@ METHOD OnRelease() CLASS WVWMouseButton
|
||||
|
||||
LOCAL lWasPressed := ::lPressed
|
||||
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -266,7 +266,7 @@ METHOD OnRelease() CLASS WVWMouseButton
|
||||
METHOD OnReleaseOut() CLASS WVWMouseButton
|
||||
|
||||
// left button is released outside of mouse region
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -283,7 +283,7 @@ METHOD OnReleaseOut() CLASS WVWMouseButton
|
||||
METHOD OnMouseOut() CLASS WVWMouseButton
|
||||
|
||||
// mouse is moved from over the button outside
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -301,7 +301,7 @@ METHOD OnMouseOut() CLASS WVWMouseButton
|
||||
METHOD OnMouseOver() CLASS WVWMouseButton
|
||||
|
||||
// mouse is moved to over the button from outside
|
||||
IF !::lEnable // 20040303
|
||||
IF ! ::lEnable // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
|
||||
@@ -321,10 +321,10 @@ METHOD DRAW( nWinNum ) CLASS WVWMouseButton
|
||||
LOCAL lMouseOver := ::lHover // 20040303,was: ( mrow() >= ::nrow1 .and. mrow() <= ::nrow2 .and. mcol() >= ::ncol1 .and. mcol() <= ::ncol2 )
|
||||
LOCAL lPressed := ::lPressed .AND. lMouseOver
|
||||
LOCAL aFontInfo := iif( ::nCaptionHeight == NIL, wvw_getFontInfo( nWinNum ), NIL )
|
||||
LOCAL nLabelColor := iif( !lPressed, rgb( 0, 0, 0 ), rgb( 96, 96, 96 ) )
|
||||
LOCAL nLabelColor := iif( ! lPressed, rgb( 0, 0, 0 ), rgb( 96, 96, 96 ) )
|
||||
LOCAL lUseImage := HB_ISSTRING( ::cImage ) // 20040325
|
||||
|
||||
IF !::lVisible .OR. ::nType == _BUTTON_NONE
|
||||
IF ! ::lVisible .OR. ::nType == _BUTTON_NONE
|
||||
SetCursor( nOldCursor ) // 20040303
|
||||
RETURN Self
|
||||
ENDIF
|
||||
@@ -346,7 +346,7 @@ METHOD DRAW( nWinNum ) CLASS WVWMouseButton
|
||||
ENDIF
|
||||
|
||||
IF lUseImage .AND. ::nType != _BUTTON_NONE
|
||||
IF !Wvw_DrawImage( nWinNum, ::nRow1, ::nCol1, ::nRow2, ::nCol2, ::cImage, ::lTight )
|
||||
IF ! Wvw_DrawImage( nWinNum, ::nRow1, ::nCol1, ::nRow2, ::nCol2, ::cImage, ::lTight )
|
||||
win_messagebox( NIL, "Button Failed Wvw_DrawImage(" + ::cImage + ")" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -364,7 +364,7 @@ METHOD DRAW( nWinNum ) CLASS WVWMouseButton
|
||||
ENDIF
|
||||
|
||||
IF lUseImage .AND. ::nType != _BUTTON_NONE
|
||||
IF !Wvw_DrawImage( nWinNum, ::nRow1, ::nCol1, ::nRow2, ::nCol2, ::cImage, ::lTight )
|
||||
IF ! Wvw_DrawImage( nWinNum, ::nRow1, ::nCol1, ::nRow2, ::nCol2, ::cImage, ::lTight )
|
||||
win_messagebox( NIL, "Button Failed Wvw_DrawImage(" + ::cImage + ")" )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -431,7 +431,7 @@ FUNCTION wvwm_SetKeyRepeater( lSet )
|
||||
LOCAL lWasSet := ( s_nkeyrepeater != NIL )
|
||||
IF lSet != NIL
|
||||
IF lSet
|
||||
IF !lWasSet
|
||||
IF ! lWasSet
|
||||
s_nkeyrepeater := hb_idleAdd( {|| xKeyRepeater() } )
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -469,7 +469,7 @@ STATIC FUNCTION nButtonChecker( nkey, oMouseObj )
|
||||
ELSE
|
||||
// cursor is over current mouse object area
|
||||
|
||||
IF !oMouseObj:lHover
|
||||
IF ! oMouseObj:lHover
|
||||
// user has just moved the cursor into over this button
|
||||
oMouseObj:OnMouseOver()
|
||||
ELSE
|
||||
|
||||
@@ -183,7 +183,7 @@ PROCEDURE Main()
|
||||
wvw_pbSetFont( , "Tahoma", 14 )
|
||||
nCursor := SetCursor( SC_NONE )
|
||||
|
||||
IF !SetDefaultWindowSize()
|
||||
IF ! SetDefaultWindowSize()
|
||||
ldebug( "Cannot setDefaultWindowSize()" )
|
||||
ELSE
|
||||
ldebug( "Successfully setDefaultWindowSize()" )
|
||||
@@ -399,7 +399,7 @@ PROCEDURE Demo_Console( nTop, nLeft, nBottom, nRight )
|
||||
Demo_Console( nTop + 2, nLeft + 2, nBottom + 4, nRight + 6 )
|
||||
ELSEIF ch == K_CTRL_E
|
||||
// toggle echoing output to prev window
|
||||
lEchoing := !lEchoing
|
||||
lEchoing := ! lEchoing
|
||||
ELSE
|
||||
// any other char goes here
|
||||
?? hb_keyChar( ch )
|
||||
@@ -586,7 +586,7 @@ FUNCTION DEMO_Browse()
|
||||
RefreshHXB( oBrowse, nCurWindow, nHScrollBar ) // 20040704
|
||||
RefreshVXB( oBrowse, nCurWindow, nVScrollBar ) // 20040704
|
||||
|
||||
WHILE !lEnd
|
||||
WHILE ! lEnd
|
||||
nKey := Inkey( 0 )
|
||||
|
||||
DO CASE
|
||||
@@ -947,7 +947,7 @@ FUNCTION CreateToolbar( nWinNum )
|
||||
|
||||
ldefault := lYesNo( "would you like to use default toolbar setting?" )
|
||||
|
||||
IF !ldefault
|
||||
IF ! ldefault
|
||||
nSysBitmap := Alert( "Select toolbar button size", { "Small", "Big" } )
|
||||
nSysBitmap := iif( nSysBitmap == 0, 1, nSysBitmap )
|
||||
lDisplayText := Alert( "Display text in toolbar?", { "Yes", "No" } ) == 1
|
||||
|
||||
@@ -243,7 +243,7 @@ METHOD ProcessCGI() CLASS THTML
|
||||
|
||||
cQuery := ::GetCGIParam( CGI_QUERY_STRING )
|
||||
|
||||
IF !Empty( cQuery )
|
||||
IF ! Empty( cQuery )
|
||||
|
||||
::aQueryFields := {}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ FUNCTION pdfAtSay( cString, nRow, nCol, cUnits, lExact, cId )
|
||||
nRow := pdfM2Y( nRow )
|
||||
nCol := pdfM2X( nCol )
|
||||
ELSEIF cUnits == "R"
|
||||
IF !lExact
|
||||
IF ! lExact
|
||||
pdfCheckLine( nRow )
|
||||
nRow := nRow + t_aReport[ PDFTOP ]
|
||||
ENDIF
|
||||
@@ -61,7 +61,7 @@ FUNCTION pdfAtSay( cString, nRow, nCol, cUnits, lExact, cId )
|
||||
nCol * 100.00 / t_aReport[ REPORTWIDTH ] * ;
|
||||
( t_aReport[ PAGEX ] - pdfM2X( t_aReport[ PDFLEFT ] ) * 2 - 9.0 ) / 100.00
|
||||
ENDIF
|
||||
IF !Empty( cString )
|
||||
IF ! Empty( cString )
|
||||
cString := pdfStringB( cString )
|
||||
IF Right( cString, 1 ) == Chr( 255 ) // reverse
|
||||
cString := Left( cString, Len( cString ) - 1 )
|
||||
@@ -281,7 +281,7 @@ FUNCTION pdfBox( x1, y1, x2, y2, nBorder, nShade, cUnits, cColor, cId )
|
||||
|
||||
// version 0.02
|
||||
cBoxColor := ""
|
||||
IF !Empty( cColor )
|
||||
IF ! Empty( cColor )
|
||||
cBoxColor := " " + Chr_RGB( SubStr( cColor, 2, 1 ) ) + " " + ;
|
||||
Chr_RGB( SubStr( cColor, 3, 1 ) ) + " " + ;
|
||||
Chr_RGB( SubStr( cColor, 4, 1 ) ) + " rg "
|
||||
@@ -382,7 +382,7 @@ FUNCTION pdfCenter( cString, nRow, nCol, cUnits, lExact, cId )
|
||||
|
||||
nLen := pdfLen( cString ) / 2
|
||||
IF cUnits == "R"
|
||||
IF !lExact
|
||||
IF ! lExact
|
||||
pdfCheckLine( nRow )
|
||||
nRow := nRow + t_aReport[ PDFTOP ]
|
||||
ENDIF
|
||||
@@ -820,7 +820,7 @@ FUNCTION pdfLen( cString )
|
||||
nArr := 3 // 0.04
|
||||
ENDIF
|
||||
|
||||
IF !Empty( t_aReport[ FONTWIDTH ] )
|
||||
IF ! Empty( t_aReport[ FONTWIDTH ] )
|
||||
FOR nI := 1 TO nLen
|
||||
nWidth += t_aReport[ FONTWIDTH ][ nArr ][ ( Asc( SubStr( cString, nI, 1 ) ) - 32 ) * 4 + 1 + nAdd ] * 25.4 * t_aReport[ FONTSIZE ] / 720.00 / 100.00
|
||||
NEXT
|
||||
@@ -863,7 +863,7 @@ FUNCTION pdfNewPage( _cPageSize, _cPageOrient, _nLpi, _cFontName, _nFontType, _n
|
||||
__defaultNIL( @_nFontType, pdfGetFontInfo( "TYPE" ) )
|
||||
__defaultNIL( @_nFontSize, t_aReport[ FONTSIZE ] )
|
||||
|
||||
IF !Empty( t_aReport[ PAGEBUFFER ] )
|
||||
IF ! Empty( t_aReport[ PAGEBUFFER ] )
|
||||
pdfClosePage()
|
||||
ENDIF
|
||||
|
||||
@@ -1090,7 +1090,7 @@ FUNCTION pdfRJust( cString, nRow, nCol, cUnits, lExact, cId )
|
||||
nLen := pdfLen( cString )
|
||||
|
||||
IF cUnits == "R"
|
||||
IF !lExact
|
||||
IF ! lExact
|
||||
pdfCheckLine( nRow )
|
||||
nRow := nRow + t_aReport[ PDFTOP ]
|
||||
ENDIF
|
||||
@@ -1360,7 +1360,7 @@ FUNCTION pdfOpenHeader( cFile )
|
||||
LOCAL nAt // , nErrorCode:=0
|
||||
|
||||
__defaultNIL( @cFile, "" )
|
||||
IF !Empty( cFile )
|
||||
IF ! Empty( cFile )
|
||||
cFile := AllTrim( cFile )
|
||||
IF Len( cFile ) > 12 .OR. ;
|
||||
At( ' ', cFile ) > 0 .OR. ;
|
||||
@@ -1452,7 +1452,7 @@ FUNCTION pdfHeader( cFunction, cId, arr )
|
||||
LOCAL nId, nI, nLen, nIdLen
|
||||
|
||||
nId := 0
|
||||
IF !Empty( cId )
|
||||
IF ! Empty( cId )
|
||||
cId := Upper( cId )
|
||||
nId := AScan( t_aReport[ HEADER ], {| arr | arr[ 3 ] == cId } )
|
||||
ENDIF
|
||||
@@ -2434,9 +2434,9 @@ STATIC FUNCTION AllToken( cString, cDelimiter, nPointer, nAction )
|
||||
// nAction == 2 - attoken
|
||||
|
||||
WHILE nPos <= nLen
|
||||
IF !SubStr( cString, nPos, 1 ) $ cDelimiter
|
||||
IF ! SubStr( cString, nPos, 1 ) $ cDelimiter
|
||||
nStart := nPos
|
||||
WHILE nPos <= nLen .AND. !SubStr( cString, nPos, 1 ) $ cDelimiter
|
||||
WHILE nPos <= nLen .AND. ! SubStr( cString, nPos, 1 ) $ cDelimiter
|
||||
++nPos
|
||||
ENDDO
|
||||
++nTokens
|
||||
|
||||
@@ -226,12 +226,12 @@ METHOD ExcelWriterXML_Sheet:getSheetXML( handle )
|
||||
FOR ic := 1 TO Len( rowData )
|
||||
column := hb_HKeyAt( rowData, ic )
|
||||
cell := hb_HValueAt( rowData, ic )
|
||||
IF !Empty( cell[ "formula" ] )
|
||||
IF ! Empty( cell[ "formula" ] )
|
||||
formula := 'ss:Formula="' + cell[ "formula" ] + '"'
|
||||
ELSE
|
||||
formula := ""
|
||||
ENDIF
|
||||
IF !Empty( cell[ "style" ] )
|
||||
IF ! Empty( cell[ "style" ] )
|
||||
style := 'ss:StyleID="' + cell[ "style" ] + '"'
|
||||
ELSE
|
||||
style := ""
|
||||
|
||||
@@ -344,7 +344,7 @@ METHOD ExcelWriterXML_Style:alignHorizontal( halign )
|
||||
|
||||
METHOD ExcelWriterXML_Style:alignRotate( rotate )
|
||||
|
||||
IF !HB_ISNUMERIC( rotate )
|
||||
IF ! HB_ISNUMERIC( rotate )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
IF Abs( rotate ) > 90
|
||||
|
||||
@@ -91,7 +91,7 @@ FUNCTION uhttpd_GetVars( cFields, cSeparator )
|
||||
// now check if variable already exists. If yes and I have already another element
|
||||
// with same name, then I will change it to an array
|
||||
IF ( hb_HPos( hHashVars, cName ) ) > 0
|
||||
IF !HB_ISARRAY( hHashVars[ cName ] )
|
||||
IF ! HB_ISARRAY( hHashVars[ cName ] )
|
||||
// Transform it to array
|
||||
hHashVars[ cName ] := { hHashVars[ cName ] }
|
||||
ENDIF
|
||||
@@ -156,7 +156,7 @@ FUNCTION uhttpd_SplitUrl( cUrl )
|
||||
cProto := ""
|
||||
ENDIF
|
||||
|
||||
cUri += cProto + iif( !Empty( cProto ), "://", "" )
|
||||
cUri += cProto + iif( ! Empty( cProto ), "://", "" )
|
||||
|
||||
// Now we have:
|
||||
// [username:password@]hostname[:port][/path[/file[.ext]][?arg1=[value][&arg2=[value]]][#anchor]]
|
||||
@@ -347,7 +347,7 @@ FUNCTION uhttpd_URLEncode( cString, lComplete )
|
||||
cChar == '/' .OR. cChar == ';' .OR. cChar == '_'
|
||||
cRet += cChar
|
||||
|
||||
CASE iif( !lComplete, cChar == ':' .OR. cChar == '?' .OR. cChar == '=', .F. )
|
||||
CASE iif( ! lComplete, cChar == ':' .OR. cChar == '?' .OR. cChar == '=', .F. )
|
||||
cRet += cChar
|
||||
|
||||
OTHERWISE
|
||||
@@ -663,7 +663,7 @@ PROCEDURE uhttpd_Die( cError )
|
||||
|
||||
IF cError != NIL // THEN OutStd( cError )
|
||||
// __OutDebug( "cError: ", cError )
|
||||
// IF !oCGI:HeaderSent()
|
||||
// IF ! oCGI:HeaderSent()
|
||||
// oCGI:WriteLN( CRLF2BR( cError ), CRLF2BR( CRLF() ) )
|
||||
// //oCGI:WriteLN( CRLF2BR( hb_dumpVar(TConfigure():hConfig) ) )
|
||||
// ENDIF
|
||||
@@ -679,7 +679,7 @@ PROCEDURE uhttpd_Die( cError )
|
||||
oErr:fileName := ""
|
||||
oErr:osCode := 0
|
||||
lError := Eval( ErrorBlock(), oErr )
|
||||
IF !HB_ISLOGICAL( lError ) .OR. lError
|
||||
IF ! HB_ISLOGICAL( lError ) .OR. lError
|
||||
__errInHandler()
|
||||
ENDIF
|
||||
Break( oErr )
|
||||
@@ -749,7 +749,7 @@ PROCEDURE uhttpd_WriteToLogFile( cString, cLog, lCreate )
|
||||
|
||||
IF cLog != NIL
|
||||
|
||||
IF !lCreate .AND. hb_FileExists( cLog )
|
||||
IF ! lCreate .AND. hb_FileExists( cLog )
|
||||
nHandle := FOpen( cLog, FO_READWRITE + FO_SHARED )
|
||||
ELSE
|
||||
nHandle := hb_FCreate( cLog, FC_NORMAL, FO_READWRITE + FO_SHARED )
|
||||
@@ -789,7 +789,7 @@ FUNCTION uhttpd_SplitFileName( cFile )
|
||||
|
||||
cSep := hb_ps()
|
||||
|
||||
hFile:FULLPATH := iif( !Empty( hFile:PATH ), iif( !( Right( hFile:PATH, Len( cSep ) ) == cSep ), hFile:PATH + cSep, hFile:PATH ), "" )
|
||||
hFile:FULLPATH := iif( ! Empty( hFile:PATH ), iif( !( Right( hFile:PATH, Len( cSep ) ) == cSep ), hFile:PATH + cSep, hFile:PATH ), "" )
|
||||
hFile:UNC := hFile:FULLPATH + hFile:FULLNAME
|
||||
|
||||
RETURN hFile
|
||||
|
||||
@@ -69,7 +69,7 @@ FUNCTION HRBMAIN()
|
||||
IF hb_HHasKey( _REQUEST, "w" )
|
||||
|
||||
cHtml := CreateCounter( hb_ntos( Val( _REQUEST[ "w" ] ) ) )
|
||||
IF !Empty( cHtml )
|
||||
IF ! Empty( cHtml )
|
||||
uhttpd_SetHeader( "Content-Type", "image/gif" )
|
||||
uhttpd_SetHeader( "Pragma", "no-cache" )
|
||||
uhttpd_SetHeader( "Content-Disposition", "inline; filename=counter" + hb_ntos( hb_RandomInt( 100 ) ) + ".gif" )
|
||||
|
||||
@@ -221,7 +221,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
// ::oCGI:ToLogFile( "::cSID = " + hb_cStr( ::cSID ), "/pointtoit/tmp/log.txt" )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::cSID ) .AND. !::CheckSID()
|
||||
IF ! Empty( ::cSID ) .AND. ! ::CheckSID()
|
||||
// Check if the SID is NOT valid, someone altered it
|
||||
// ::oCGI:ToLogFile( "::cSID = " + hb_cStr( ::cSID ) + " SID is NOT valid, someone altered it", "/pointtoit/tmp/log.txt" )
|
||||
::cSID := NIL // invalidate current SID, i'll generate a new one
|
||||
@@ -229,7 +229,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
lDefine_SID := .T.
|
||||
ENDIF
|
||||
|
||||
IF !Empty( ::cSID ) .AND. !Empty( ::cReferrer_Check )
|
||||
IF ! Empty( ::cSID ) .AND. ! Empty( ::cReferrer_Check )
|
||||
// TODO: fix
|
||||
|
||||
// oUrl := TUrl():New( ::cReferrer_Check )
|
||||
@@ -260,7 +260,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
ENDIF
|
||||
|
||||
// Is use_cookies set to false?
|
||||
IF !::lUse_Cookies .AND. lSendCookie
|
||||
IF ! ::lUse_Cookies .AND. lSendCookie
|
||||
lDefine_SID := .T.
|
||||
lSendCookie := .F.
|
||||
ENDIF
|
||||
@@ -281,7 +281,7 @@ METHOD Start( cSID ) CLASS uhttpd_Session
|
||||
// Send caching headers
|
||||
|
||||
// Start session
|
||||
IF !::Open( ::cSavePath, ::cName )
|
||||
IF ! ::Open( ::cSavePath, ::cName )
|
||||
uhttpd_Die( 'ERROR: Failed to open session file' )
|
||||
ENDIF
|
||||
|
||||
@@ -316,7 +316,7 @@ METHOD Destroy() CLASS uhttpd_Session
|
||||
ENDIF
|
||||
|
||||
// Destroy session
|
||||
IF !Eval( ::bDestroy, ::cSID )
|
||||
IF ! Eval( ::bDestroy, ::cSID )
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
@@ -336,11 +336,11 @@ METHOD Close() CLASS uhttpd_Session
|
||||
cVal := ::Encode()
|
||||
|
||||
// Save session
|
||||
IF !::Write( ::cSID, cVal )
|
||||
IF ! ::Write( ::cSID, cVal )
|
||||
uhttpd_Die( 'Session could not be saved.' )
|
||||
ENDIF
|
||||
// Close session
|
||||
IF !Eval( ::bClose )
|
||||
IF ! Eval( ::bClose )
|
||||
uhttpd_Die( 'Session could not be closed.' )
|
||||
ENDIF
|
||||
::nActiveSessions--
|
||||
@@ -479,7 +479,7 @@ METHOD GetSessionVars( aHashVars, cFields, cSeparator ) CLASS uhttpd_Session
|
||||
AAdd( aNotSessionFlds, aField )
|
||||
ENDIF
|
||||
NEXT
|
||||
IF !Empty( aNotSessionFlds )
|
||||
IF ! Empty( aNotSessionFlds )
|
||||
FOR EACH aField IN aNotSessionFlds
|
||||
cFieldsNotInSession += aField[ 1 ] + "=" + aField[ 2 ] + "&"
|
||||
NEXT
|
||||
@@ -558,7 +558,7 @@ METHOD CheckSID( cSID, cCRCKey ) CLASS uhttpd_Session
|
||||
|
||||
// hb_toOutDebug( "cSID = %s, ::cSID = %s\n\r", hb_valtoexp( cSID ), hb_valtoexp( ::cSID ) )
|
||||
|
||||
IF !Empty( cSID )
|
||||
IF ! Empty( cSID )
|
||||
|
||||
/* Calculate the key */
|
||||
FOR n := 1 TO nLenSID - 5 // 5 = CRC Length
|
||||
@@ -846,7 +846,7 @@ METHOD Encode() CLASS uhttpd_Session
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN iif( !Empty( aSerial ), hb_Serialize( aSerial ), NIL )
|
||||
RETURN iif( ! Empty( aSerial ), hb_Serialize( aSerial ), NIL )
|
||||
|
||||
METHOD Decode( cData ) CLASS uhttpd_Session
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ PROCEDURE Main( ... )
|
||||
LOCAL nConsoleRows, nConsoleCols
|
||||
LOCAL nCmdConsoleRows, nCmdConsoleCols
|
||||
|
||||
IF !hb_mtvm()
|
||||
IF ! hb_mtvm()
|
||||
? "I need multhread support. Please, recompile me!"
|
||||
WAIT
|
||||
ErrorLevel( 2 )
|
||||
@@ -708,7 +708,7 @@ STATIC FUNCTION AcceptConnections()
|
||||
ENDIF
|
||||
|
||||
// Waiting a connection from main application loop
|
||||
IF !lQuitRequest
|
||||
IF ! lQuitRequest
|
||||
hb_mutexSubscribe( s_hmtxQueue,, @hSocket )
|
||||
ENDIF
|
||||
|
||||
@@ -972,7 +972,7 @@ STATIC FUNCTION ProcessConnection()
|
||||
// Here I remove this thread from thread queue as it is unnecessary, but only if there is not
|
||||
// an external quit request. In this case application is quitting and I cannot resize array
|
||||
// here to avoid race condition
|
||||
IF !lQuitRequest .AND. hb_mutexLock( s_hmtxBusy )
|
||||
IF ! lQuitRequest .AND. hb_mutexLock( s_hmtxBusy )
|
||||
// hb_ToOutDebug( "Len( s_aRunningThreads ) = %i\n\r", Len( s_aRunningThreads ) )
|
||||
IF ( nPos := AScan( s_aRunningThreads, hb_threadSelf() ) > 0 )
|
||||
hb_ADel( s_aRunningThreads, nPos, .T. )
|
||||
@@ -1117,7 +1117,7 @@ STATIC FUNCTION ServiceConnection()
|
||||
// Here I remove this thread from thread queue as it is unnecessary, but only if there is not
|
||||
// an external quit request. In this case application is quitting and I cannot resize array
|
||||
// here to avoid race condition
|
||||
IF !lQuitRequest .AND. hb_mutexLock( s_hmtxBusy )
|
||||
IF ! lQuitRequest .AND. hb_mutexLock( s_hmtxBusy )
|
||||
IF ( nPos := AScan( s_aServiceThreads, hb_threadSelf() ) > 0 )
|
||||
hb_ADel( s_aServiceThreads, nPos, .T. )
|
||||
s_nServiceThreads := Len( s_aServiceThreads )
|
||||
@@ -1217,7 +1217,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
IF hb_HPos( _HTTP_REQUEST, "Host" ) == 0
|
||||
|
||||
// Try to determine Host name
|
||||
IF !Empty( hUrl[ "HOST" ] )
|
||||
IF ! Empty( hUrl[ "HOST" ] )
|
||||
_HTTP_REQUEST[ "Host" ] := hUrl[ "HOST" ]
|
||||
ELSE
|
||||
_HTTP_REQUEST[ "Host" ] := ""
|
||||
@@ -1232,7 +1232,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
|
||||
// GET
|
||||
cFields := _SERVER[ "QUERY_STRING" ]
|
||||
IF !Empty( cFields )
|
||||
IF ! Empty( cFields )
|
||||
hVars := uhttpd_GetVars( cFields )
|
||||
hb_HMerge( _GET, hVars )
|
||||
hb_HMerge( _REQUEST, hVars )
|
||||
@@ -1243,7 +1243,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
// POST
|
||||
IF "POST" $ Upper( _SERVER[ 'REQUEST_METHOD' ] )
|
||||
cFields := ATail( aRequest )
|
||||
IF !Empty( cFields )
|
||||
IF ! Empty( cFields )
|
||||
hVars := uhttpd_GetVars( cFields )
|
||||
hb_HMerge( _POST, hVars )
|
||||
hb_HMerge( _REQUEST, hVars )
|
||||
@@ -1255,7 +1255,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
|
||||
// COOKIES
|
||||
cFields := _SERVER[ 'HTTP_COOKIE' ]
|
||||
IF !Empty( cFields )
|
||||
IF ! Empty( cFields )
|
||||
hVars := uhttpd_GetVars( cFields, ";" )
|
||||
hb_HMerge( _COOKIE, hVars )
|
||||
hb_HMerge( _REQUEST, hVars )
|
||||
@@ -1862,7 +1862,7 @@ FUNCTION uhttpd_join( cSeparator, aData )
|
||||
CASE "C"
|
||||
CASE "M"; cRet += aData[ nI ]; EXIT
|
||||
CASE "N"; cRet += LTrim( Str( aData[ nI ] ) ); EXIT
|
||||
CASE "D"; cRet += iif( !Empty( aData[ nI ] ), DToC( aData[ nI ] ), "" ); EXIT
|
||||
CASE "D"; cRet += iif( ! Empty( aData[ nI ] ), DToC( aData[ nI ] ), "" ); EXIT
|
||||
ENDSWITCH
|
||||
NEXT
|
||||
|
||||
@@ -1959,7 +1959,7 @@ STATIC FUNCTION uproc_default()
|
||||
// Check for PATH_INFO: I will search if there is a physical file removing parts from right
|
||||
cBaseFile := cScript
|
||||
lFound := .F.
|
||||
DO WHILE !Empty( cBaseFile )
|
||||
DO WHILE ! Empty( cBaseFile )
|
||||
|
||||
// hb_toOutDebug( "cBaseFile = %s, cPathInfo = %s\n\r", cBaseFile, cPathInfo )
|
||||
|
||||
@@ -1987,7 +1987,7 @@ STATIC FUNCTION uproc_default()
|
||||
// hb_toOutDebug( "Uscita: cBaseFile = %s, cPathInfo = %s\n\r", cBaseFile, cPathInfo )
|
||||
|
||||
// Found a script file name
|
||||
IF lFound .AND. !Empty( cPathInfo )
|
||||
IF lFound .AND. ! Empty( cPathInfo )
|
||||
// Store PATH_INFO
|
||||
_SERVER[ "PATH_INFO" ] := cPathInfo
|
||||
_SERVER[ "PATH_TRANSLATED" ] := cFileName
|
||||
@@ -2065,7 +2065,7 @@ STATIC PROCEDURE ShowServerStatus()
|
||||
uhttpd_Write( '<br>Total Connections: ' + Str( s_nTotConnections ) )
|
||||
cThreads := ""
|
||||
AEval( s_aRunningThreads, {| e | cThreads += hb_ntos( hb_threadID( e ) ) + "," } )
|
||||
cThreads := "{ " + iif( !Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
cThreads := "{ " + iif( ! Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
uhttpd_Write( '<br>Running Threads: ' + cThreads )
|
||||
|
||||
#ifndef FIXED_THREADS
|
||||
@@ -2075,7 +2075,7 @@ STATIC PROCEDURE ShowServerStatus()
|
||||
uhttpd_Write( '<br>Total Service Connections: ' + Str( s_nTotServiceConnections ) )
|
||||
cThreads := ""
|
||||
AEval( s_aServiceThreads, {| e | cThreads += hb_ntos( hb_threadID( e ) ) + "," } )
|
||||
cThreads := "{ " + iif( !Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
cThreads := "{ " + iif( ! Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
uhttpd_Write( '<br>Service Threads: ' + cThreads )
|
||||
#endif // FIXED_THREADS
|
||||
|
||||
@@ -2124,7 +2124,7 @@ STATIC PROCEDURE ShowFolder( cDir )
|
||||
|
||||
// hb_ToOutDebug( "cDir = %s, nPos = %i, cParentDir = %s\n\r", cDir, nPos, cParentDir )
|
||||
|
||||
IF !Empty( cParentDir )
|
||||
IF ! Empty( cParentDir )
|
||||
// Add parent directory
|
||||
hb_AIns( aDir, 1, { "<parent>", 0, "", "", "D" }, .T. )
|
||||
ENDIF
|
||||
@@ -2163,7 +2163,7 @@ STATIC FUNCTION HRB_LoadFromFileEncrypted( cFile, cKey )
|
||||
// Reverse function to save is:
|
||||
PROCEDURE HRB_SaveToFileEncrypted( cHrbBody, cKey, cEncFileName )
|
||||
LOCAL cFile
|
||||
IF !Empty( cHrbBody )
|
||||
IF ! Empty( cHrbBody )
|
||||
cHrbBody := hb_zcompress( cHrbBody )
|
||||
cHrbBody := sx_encrypt( cHrbBody, cKey )
|
||||
hb_memowrit( cEncFileName, cHrbBody )
|
||||
@@ -2340,7 +2340,7 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
// hb_ToOutDebug( "hDefault = %s\n\r", hb_ValToExp( hDefault ) )
|
||||
|
||||
// Now read changes from ini file and modify only admited keys
|
||||
IF !Empty( hIni )
|
||||
IF ! Empty( hIni )
|
||||
FOR EACH cSection IN hIni:Keys
|
||||
|
||||
cSection := Upper( cSection )
|
||||
@@ -2390,12 +2390,12 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
CASE cKey == "CONSOLE-COLS"
|
||||
xVal := Val( cVal )
|
||||
CASE cKey == "APPLICATION_ROOT"
|
||||
IF !Empty( cVal )
|
||||
IF ! Empty( cVal )
|
||||
// Change APP_DIR macro with current exe path
|
||||
xVal := cVal
|
||||
ENDIF
|
||||
CASE cKey == "DOCUMENT_ROOT"
|
||||
IF !Empty( cVal )
|
||||
IF ! Empty( cVal )
|
||||
// After will change APP_DIR macro with application dir
|
||||
// xVal := StrTran( cVal, "$(APP_DIR)", Exe_Path() )
|
||||
xVal := cVal
|
||||
@@ -2403,13 +2403,13 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
CASE cKey == "SCRIPTALIASMIXEDCASE"
|
||||
xVal := cVal
|
||||
CASE cKey == "SESSIONPATH"
|
||||
IF !Empty( cVal )
|
||||
IF ! Empty( cVal )
|
||||
// Change APP_DIR macro with current exe path
|
||||
// xVal := StrTran( cVal, "$(APP_DIR)", Exe_Path() )
|
||||
xVal := cVal
|
||||
ENDIF
|
||||
CASE cKey == "DIRECTORYINDEX"
|
||||
IF !Empty( cVal )
|
||||
IF ! Empty( cVal )
|
||||
xVal := uhttpd_split( " ", AllTrim( cVal ) )
|
||||
ENDIF
|
||||
ENDCASE
|
||||
@@ -2632,9 +2632,9 @@ STATIC FUNCTION ErrorMessage( oError )
|
||||
|
||||
// add either filename or operation
|
||||
DO CASE
|
||||
CASE !Empty( oError:filename )
|
||||
CASE ! Empty( oError:filename )
|
||||
cMessage += ": " + oError:filename
|
||||
CASE !Empty( oError:operation )
|
||||
CASE ! Empty( oError:operation )
|
||||
cMessage += ": " + oError:operation
|
||||
ENDCASE
|
||||
|
||||
@@ -2669,7 +2669,7 @@ STATIC FUNCTION Handler_Default( cFileName )
|
||||
ELSEIF hb_DirExists( uhttpd_OSFileName( cFileName ) )
|
||||
|
||||
// If I'm here it's means that I have no page, so, if it is defined, I will display content folder
|
||||
IF !s_lIndexes
|
||||
IF ! s_lIndexes
|
||||
uhttpd_SetStatusCode( 403 )
|
||||
t_cErrorMsg := "Display file list not allowed"
|
||||
ELSE
|
||||
@@ -2708,7 +2708,7 @@ STATIC FUNCTION Handler_ServerStatus()
|
||||
uhttpd_Write( '<br>Total Connections: ' + Str( s_nTotConnections ) )
|
||||
cThreads := ""
|
||||
AEval( s_aRunningThreads, {| e | cThreads += hb_ntos( hb_threadID( e ) ) + "," } )
|
||||
cThreads := "{ " + iif( !Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
cThreads := "{ " + iif( ! Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
uhttpd_Write( '<br>Running Threads: ' + cThreads )
|
||||
|
||||
#ifndef FIXED_THREADS
|
||||
@@ -2718,7 +2718,7 @@ STATIC FUNCTION Handler_ServerStatus()
|
||||
uhttpd_Write( '<br>Total Service Connections: ' + Str( s_nTotServiceConnections ) )
|
||||
cThreads := ""
|
||||
AEval( s_aServiceThreads, {| e | cThreads += hb_ntos( hb_threadID( e ) ) + "," } )
|
||||
cThreads := "{ " + iif( !Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
cThreads := "{ " + iif( ! Empty( cThreads ), Left( cThreads, Len( cThreads ) - 1 ), "<empty>" ) + " }"
|
||||
uhttpd_Write( '<br>Service Threads: ' + cThreads )
|
||||
#endif // FIXED_THREADS
|
||||
|
||||
@@ -2739,20 +2739,20 @@ STATIC FUNCTION Handler_HrbScript( cFileName )
|
||||
|
||||
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
|
||||
// Lock HRB to avoid MT race conditions
|
||||
IF !HRB_ACTIVATE_CACHE
|
||||
IF ! HRB_ACTIVATE_CACHE
|
||||
cHRBBody := HRB_LoadFromFile( uhttpd_OSFileName( cFileName ) )
|
||||
ENDIF
|
||||
IF hb_mutexLock( s_hmtxHRB )
|
||||
BEGIN SEQUENCE
|
||||
IF HRB_ACTIVATE_CACHE
|
||||
// caching modules
|
||||
IF !hb_HHasKey( s_hHRBModules, cFileName )
|
||||
IF ! hb_HHasKey( s_hHRBModules, cFileName )
|
||||
hb_HSet( s_hHRBModules, cFileName, HRB_LoadFromFile( uhttpd_OSFileName( cFileName ) ) )
|
||||
ENDIF
|
||||
cHRBBody := s_hHRBModules[ cFileName ]
|
||||
ENDIF
|
||||
WriteToConsole( "Executing: " + cFileName )
|
||||
IF !Empty( pHRB := hb_hrbLoad( cHRBBody ) )
|
||||
IF ! Empty( pHRB := hb_hrbLoad( cHRBBody ) )
|
||||
|
||||
// save current directory
|
||||
cCurPath := hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir()
|
||||
@@ -2823,7 +2823,7 @@ STATIC FUNCTION Handler_CgiScript( cFileName )
|
||||
ELSE
|
||||
|
||||
uhttpd_SetHeader( "Content-Type", "text/html" )
|
||||
IF !Empty( xResult )
|
||||
IF ! Empty( xResult )
|
||||
uhttpd_Write( xResult )
|
||||
ELSE
|
||||
uhttpd_Write( "CGI Error" )
|
||||
|
||||
@@ -155,7 +155,7 @@ METHOD addWindows( aArray, nRow ) CLASS HBDbObject
|
||||
oCol:ColorBlock := {|| { iif( ::Arrayindex == oBrwSets:Cargo, 2, 1 ), 2 } }
|
||||
oBrwSets:Freeze := 1
|
||||
|
||||
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| iif( HB_ISSTRING( ::ArrayReference[ ::ArrayIndex, 2 ] ) .AND. !::ArrayReference[ ::ArrayIndex, 3 ], ;
|
||||
oBrwSets:AddColumn( oCol := HBDbColumnNew( "", {|| iif( HB_ISSTRING( ::ArrayReference[ ::ArrayIndex, 2 ] ) .AND. ! ::ArrayReference[ ::ArrayIndex, 3 ], ;
|
||||
::ArrayReference[ ::ArrayIndex, 2 ], ;
|
||||
PadR( __dbgValToStr( __dbgObjGetValue( ::TheObj, ::ArrayReference[ ::arrayindex, 1 ] ) ), nWidth - 12 ) ) } ) )
|
||||
|
||||
@@ -189,7 +189,7 @@ METHOD doGet( oBrowse, pItem, nSet ) CLASS HBDbObject
|
||||
|
||||
// create a corresponding GET
|
||||
cValue := __dbgObjGetValue( ::TheObj, pitem[ nSet, 1 ], @lCanAcc )
|
||||
IF !lCanAcc
|
||||
IF ! lCanAcc
|
||||
__dbgAlert( cValue )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
@@ -273,7 +273,7 @@ METHOD SetsKeyPressed( nKey, oBrwSets, nSets, aArray ) CLASS HBDbObject
|
||||
ELSEIF HB_ISOBJECT( aArray[ nSet, 2 ] )
|
||||
HBDbObject():New( aArray[ nSet, 2 ], ::pitems[ nSet, 1 ] )
|
||||
ELSEIF ( HB_ISSTRING( aArray[ nSet, 2 ] ) .AND. ;
|
||||
!aArray[ nSet, 3 ] ) .OR. ;
|
||||
! aArray[ nSet, 3 ] ) .OR. ;
|
||||
HB_ISBLOCK( aArray[ nSet, 2 ] ) .OR. ;
|
||||
HB_ISPOINTER( aArray[ nSet, 2 ] )
|
||||
__dbgAlert( "Value cannot be edited" )
|
||||
|
||||
@@ -92,7 +92,7 @@ PROCEDURE __dbgShowWorkAreas()
|
||||
RETURN
|
||||
ENDIF
|
||||
|
||||
IF !Used()
|
||||
IF ! Used()
|
||||
dbSelectArea( aAlias[ 1 ][ 1 ] )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@ CREATE CLASS HBDebugger
|
||||
METHOD RestoreAppScreen()
|
||||
METHOD RestoreAppState()
|
||||
METHOD RestoreSettings()
|
||||
METHOD RunAtStartup() INLINE ::lRunAtStartup := ::oPullDown:GetItemByIdent( "ALTD" ):checked := !::lRunAtStartup
|
||||
METHOD RunAtStartup() INLINE ::lRunAtStartup := ::oPullDown:GetItemByIdent( "ALTD" ):checked := ! ::lRunAtStartup
|
||||
METHOD SaveAppScreen()
|
||||
METHOD SaveAppState()
|
||||
METHOD SaveSettings()
|
||||
@@ -327,7 +327,7 @@ CREATE CLASS HBDebugger
|
||||
METHOD Sort() INLINE ASort( ::aVars,,, {| x, y | x[ 1 ] < y[ 1 ] } ), ;
|
||||
::lSortVars := .T., ;
|
||||
iif( ::oBrwVars != NIL, ::oBrwVars:RefreshAll(), NIL ), ;
|
||||
iif( ::oWndVars != NIL .AND. ::oWndVars:lVisible, iif( !::lGo .AND. ::oBrwVars != NIL, ::oBrwVars:ForceStable(), NIL ), NIL )
|
||||
iif( ::oWndVars != NIL .AND. ::oWndVars:lVisible, iif( ! ::lGo .AND. ::oBrwVars != NIL, ::oBrwVars:ForceStable(), NIL ), NIL )
|
||||
|
||||
METHOD Speed() INLINE ::nSpeed := ::InputBox( "Step delay (in tenths of a second)", ::nSpeed )
|
||||
|
||||
@@ -420,7 +420,7 @@ METHOD New() CLASS HBDebugger
|
||||
|
||||
METHOD OpenDebuggerWindow() CLASS HBDebugger
|
||||
|
||||
IF !::lDebuggerWindowIsOpen
|
||||
IF ! ::lDebuggerWindowIsOpen
|
||||
::hUserWindow := hb_gtInfo( HB_GTI_GETWIN )
|
||||
IF ::hDebuggerWindow == NIL
|
||||
::hDebuggerWindow := hb_gtInfo( HB_GTI_GETWIN, ;
|
||||
@@ -870,7 +870,7 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
|
||||
CASE starts( "BP", cCommand )
|
||||
/* TODO: Support BP <cFuncName> */
|
||||
IF !Empty( cParam )
|
||||
IF ! Empty( cParam )
|
||||
IF ( n := At( " ", cParam ) ) > 0
|
||||
cParam1 := AllTrim( SubStr( cParam, n + 1 ) )
|
||||
cParam := Left( cParam, n - 1 )
|
||||
@@ -903,7 +903,7 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
CASE starts( "HELP", cCommand )
|
||||
::ShowHelp()
|
||||
|
||||
CASE starts( "INPUT", cCommand ) .AND. !Empty( cParam )
|
||||
CASE starts( "INPUT", cCommand ) .AND. ! Empty( cParam )
|
||||
::DoScript( cParam )
|
||||
|
||||
/* TODO: Support LIST BP|WP|TP */
|
||||
@@ -996,7 +996,7 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
::Resume()
|
||||
|
||||
CASE starts( "SPEED", cCommand )
|
||||
IF !Empty( cParam )
|
||||
IF ! Empty( cParam )
|
||||
::nSpeed := Val( cParam )
|
||||
ELSE
|
||||
::nSpeed := 0
|
||||
@@ -1009,7 +1009,7 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
::TracepointAdd( cParam )
|
||||
|
||||
CASE starts( "VIEW", cCommand )
|
||||
IF !Empty( cParam ) .AND. starts( "CALLSTACK", Upper( cParam ) )
|
||||
IF ! Empty( cParam ) .AND. starts( "CALLSTACK", Upper( cParam ) )
|
||||
::Stack()
|
||||
ELSE
|
||||
cResult := "Command error"
|
||||
@@ -1056,7 +1056,7 @@ METHOD DoCommand( cCommand ) CLASS HBDebugger
|
||||
hb_DispOutAt( ::oWndCommand:nBottom - 1, ::oWndCommand:nLeft + 1, ;
|
||||
Space( ::oWndCommand:nRight - ::oWndCommand:nLeft - 1 ), ;
|
||||
__DbgColors()[ 2 ] )
|
||||
IF !Empty( cResult )
|
||||
IF ! Empty( cResult )
|
||||
hb_DispOutAt( ::oWndCommand:nBottom - 1, ::oWndCommand:nLeft + 3, ;
|
||||
cResult, __DbgColors()[ 2 ] )
|
||||
::oWndCommand:ScrollUp( 1 )
|
||||
@@ -1188,7 +1188,7 @@ METHOD GetExprValue( xExpr, lValid ) CLASS HBDebugger
|
||||
|
||||
BEGIN SEQUENCE WITH {| oErr | Break( oErr ) }
|
||||
xResult := __dbgGetExprValue( ::pInfo, xExpr, @lValid )
|
||||
IF !lValid
|
||||
IF ! lValid
|
||||
xResult := "Syntax error"
|
||||
ENDIF
|
||||
RECOVER USING oErr
|
||||
@@ -1596,7 +1596,7 @@ METHOD IsValidStopLine( cName, nLine ) CLASS HBDebugger
|
||||
|
||||
METHOD LineNumbers( lLineNumbers ) CLASS HBDebugger
|
||||
|
||||
hb_default( @lLineNumbers, !::lLineNumbers )
|
||||
hb_default( @lLineNumbers, ! ::lLineNumbers )
|
||||
|
||||
::lLineNumbers := lLineNumbers
|
||||
::oPulldown:GetItemByIdent( "LINE" ):checked := ::lLineNumbers
|
||||
@@ -1740,8 +1740,8 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
|
||||
IF ::lShowGlobals
|
||||
cName := ::aProcStack[ ::oBrwStack:Cargo ][ CSTACK_MODULE ]
|
||||
FOR n := 1 TO Len( ::aModules )
|
||||
IF !::lShowAllGlobals
|
||||
IF !hb_FileMatch( ::aModules[ n ][ MODULE_NAME ], cName )
|
||||
IF ! ::lShowAllGlobals
|
||||
IF ! hb_FileMatch( ::aModules[ n ][ MODULE_NAME ], cName )
|
||||
LOOP
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1749,7 +1749,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
|
||||
FOR m := 1 TO Len( aVars )
|
||||
AAdd( aBVars, aVars[ m ] )
|
||||
NEXT
|
||||
IF !::lShowAllGlobals
|
||||
IF ! ::lShowAllGlobals
|
||||
aVars := ::aModules[ n ][ MODULE_EXTERNGLOBALS ]
|
||||
FOR m := 1 TO Len( aVars )
|
||||
AAdd( aBVars, aVars[ m ] )
|
||||
@@ -1792,7 +1792,7 @@ METHOD LoadVars() CLASS HBDebugger // updates monitored variables
|
||||
::oBrwVars:GoTop()
|
||||
ENDIF
|
||||
::aVars := aBVars
|
||||
IF ::lSortVars .AND. !Empty( ::aVars )
|
||||
IF ::lSortVars .AND. ! Empty( ::aVars )
|
||||
::Sort()
|
||||
ENDIF
|
||||
|
||||
@@ -1912,8 +1912,8 @@ METHOD Open() CLASS HBDebugger
|
||||
cFileName := aFiles[ nFileName ]
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cFileName ) ;
|
||||
.AND. ( ValType( ::cPrgName ) == "U" .OR. !hb_FileMatch( cFileName, ::cPrgName ) )
|
||||
IF ! Empty( cFileName ) ;
|
||||
.AND. ( ValType( ::cPrgName ) == "U" .OR. ! hb_FileMatch( cFileName, ::cPrgName ) )
|
||||
|
||||
IF ! hb_FileExists( cFileName ) .AND. ! Empty( ::cPathForFiles )
|
||||
cRealName := ::LocatePrgPath( cFileName )
|
||||
@@ -1957,7 +1957,7 @@ METHOD OpenPPO() CLASS HBDebugger
|
||||
IF Lower( cExt ) == ".ppo"
|
||||
::cPrgName := hb_FNameMerge( cDir, cName, ".prg" )
|
||||
lSuccess := hb_FileExists( ::cPrgName )
|
||||
::lPPO := !lSuccess
|
||||
::lPPO := ! lSuccess
|
||||
ELSE
|
||||
::cPrgName := hb_FNameMerge( cDir, cName, ".ppo" )
|
||||
lSuccess := hb_FileExists( ::cPrgName )
|
||||
@@ -2304,7 +2304,7 @@ METHOD SaveSettings() CLASS HBDebugger
|
||||
cInfo += "Options mono " + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF !::lRunAtStartup
|
||||
IF ! ::lRunAtStartup
|
||||
cInfo += "Options NoRunAtStartup " + hb_eol()
|
||||
ENDIF
|
||||
|
||||
@@ -2475,7 +2475,7 @@ METHOD ShowCodeLine( nProc ) CLASS HBDebugger
|
||||
|
||||
// we only update the stack window and up a new browse
|
||||
// to view the code if we have just broken execution
|
||||
IF !::lGo
|
||||
IF ! ::lGo
|
||||
IF ::oWndStack != NIL
|
||||
::oBrwStack:RefreshAll()
|
||||
ENDIF
|
||||
@@ -2751,7 +2751,7 @@ METHOD ToggleBreakPoint( nLine, cFileName ) CLASS HBDebugger
|
||||
|
||||
LOCAL nAt
|
||||
|
||||
IF !::lActive
|
||||
IF ! ::lActive
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
@@ -2760,7 +2760,7 @@ METHOD ToggleBreakPoint( nLine, cFileName ) CLASS HBDebugger
|
||||
nLine := ::oBrwText:RowPos
|
||||
ENDIF
|
||||
|
||||
IF !::IsValidStopLine( cFileName, nLine )
|
||||
IF ! ::IsValidStopLine( cFileName, nLine )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ METHOD New( nTop, nLeft, nBottom, nRight, cFileName, cColors, lLineNumbers ) CLA
|
||||
::oBrw:goBottomBlock := {|| ::nRow := ::nRows }
|
||||
::oBrw:skipBlock := {| n | ::Skip( n ) }
|
||||
|
||||
IF !Empty( cFileName )
|
||||
IF ! Empty( cFileName )
|
||||
::LoadFile( cFileName )
|
||||
ENDIF
|
||||
|
||||
@@ -261,7 +261,7 @@ METHOD Search( cString, lCaseSensitive, nMode ) CLASS HBBrwText
|
||||
LOCAL lFound := .F.
|
||||
LOCAL n
|
||||
|
||||
IF !lCaseSensitive
|
||||
IF ! lCaseSensitive
|
||||
cString := Upper( cString )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@ PROCEDURE __dbList( lOff, abEval, lAll, bFor, bWhile, nNext, nRecord, lRest, lTo
|
||||
|
||||
/* Save SETs */
|
||||
|
||||
IF !Empty( lToPrint )
|
||||
IF ! Empty( lToPrint )
|
||||
lOldPrinter := Set( _SET_PRINTER, .T. )
|
||||
ENDIF
|
||||
IF !Empty( cToFileName )
|
||||
IF ! Empty( cToFileName )
|
||||
hb_FNameSplit( cToFileName, @cPath, @cName, @cExt )
|
||||
IF Set( _SET_DEFEXTENSIONS ) .AND. Empty( cExt )
|
||||
cExt := ".txt"
|
||||
@@ -111,10 +111,10 @@ PROCEDURE __dbList( lOff, abEval, lAll, bFor, bWhile, nNext, nRecord, lRest, lTo
|
||||
|
||||
/* Restore SETs */
|
||||
|
||||
IF !Empty( lToPrint )
|
||||
IF ! Empty( lToPrint )
|
||||
Set( _SET_PRINTER, lOldPrinter )
|
||||
ENDIF
|
||||
IF !Empty( cToFileName )
|
||||
IF ! Empty( cToFileName )
|
||||
Set( _SET_EXTRAFILE, cOldExtraFile )
|
||||
Set( _SET_EXTRA, lOldExtra )
|
||||
ENDIF
|
||||
|
||||
@@ -106,7 +106,7 @@ FUNCTION __dbTotal( cFile, xKey, aFields,;
|
||||
ELSE
|
||||
IF nNext == NIL
|
||||
nNext := -1
|
||||
IF !lRest
|
||||
IF ! lRest
|
||||
dbGoTop()
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -145,7 +145,7 @@ FUNCTION __dbTotal( cFile, xKey, aFields,;
|
||||
nNewArea := Select()
|
||||
|
||||
dbSelectArea( nOldArea )
|
||||
DO WHILE !Eof() .AND. nNext != 0 .AND. Eval( bWhileBlock )
|
||||
DO WHILE ! Eof() .AND. nNext != 0 .AND. Eval( bWhileBlock )
|
||||
|
||||
lDbTransRecord := .F.
|
||||
|
||||
@@ -153,11 +153,11 @@ FUNCTION __dbTotal( cFile, xKey, aFields,;
|
||||
|
||||
xCurKey := Eval( bKeyBlock )
|
||||
|
||||
DO WHILE !Eof() .AND. nNext-- != 0 .AND. Eval( bWhileBlock ) .AND. ;
|
||||
DO WHILE ! Eof() .AND. nNext-- != 0 .AND. Eval( bWhileBlock ) .AND. ;
|
||||
xCurKey == Eval( bKeyBlock )
|
||||
|
||||
IF Eval( bForBlock )
|
||||
IF !lDbTransRecord
|
||||
IF ! lDbTransRecord
|
||||
__dbTransRec( nNewArea, aNewDbStruct )
|
||||
dbSelectArea( nOldArea )
|
||||
lDbTransRecord := .T.
|
||||
|
||||
@@ -241,12 +241,12 @@ FUNCTION sx_TagCount( xIndex )
|
||||
IF nOrder != 0
|
||||
cIndex := dbOrderInfo( DBOI_FULLPATH,, nOrder )
|
||||
ENDIF
|
||||
ELSEIF HB_ISSTRING( xIndex ) .AND. !Empty( xIndex )
|
||||
ELSEIF HB_ISSTRING( xIndex ) .AND. ! Empty( xIndex )
|
||||
cIndex := xIndex
|
||||
ELSE
|
||||
cIndex := dbOrderInfo( DBOI_FULLPATH )
|
||||
ENDIF
|
||||
IF !Empty( cIndex )
|
||||
IF ! Empty( cIndex )
|
||||
nTags := ordCount( cIndex )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -260,7 +260,7 @@ FUNCTION sx_Tags( xIndex )
|
||||
IF Used()
|
||||
IF HB_ISNUMERIC( xIndex )
|
||||
nOrder := sx_TagOrder( 1, xIndex )
|
||||
ELSEIF HB_ISSTRING( xIndex ) .AND. !Empty( xIndex )
|
||||
ELSEIF HB_ISSTRING( xIndex ) .AND. ! Empty( xIndex )
|
||||
nOrder := dbOrderInfo( DBOI_BAGORDER, xIndex )
|
||||
ELSE
|
||||
nOrder := ordNumber()
|
||||
@@ -281,7 +281,7 @@ FUNCTION sx_SetTag( xTag, xIndex )
|
||||
|
||||
IF Used() .AND. ValType( xTag ) $ "CN"
|
||||
IF HB_ISNUMERIC( xTag )
|
||||
IF Empty( xIndex ) .OR. !ValType( xIndex ) $ "CN"
|
||||
IF Empty( xIndex ) .OR. ! ValType( xIndex ) $ "CN"
|
||||
nOrder := xTag
|
||||
ELSEIF HB_ISSTRING( xIndex )
|
||||
IF xTag >= 1 .AND. xTag <= ordCount( xIndex )
|
||||
@@ -291,7 +291,7 @@ FUNCTION sx_SetTag( xTag, xIndex )
|
||||
nOrder := sx_TagOrder( xTag, xIndex )
|
||||
ENDIF
|
||||
ELSE
|
||||
IF Empty( xIndex ) .OR. !ValType( xIndex ) $ "CN"
|
||||
IF Empty( xIndex ) .OR. ! ValType( xIndex ) $ "CN"
|
||||
nOrder := ordNumber( xTag )
|
||||
ELSEIF HB_ISSTRING( xIndex )
|
||||
nOrder := sx_TagOrder( xTag, xIndex )
|
||||
@@ -338,7 +338,7 @@ FUNCTION sx_KillTag( xTag, xIndex )
|
||||
cIndex := dbOrderInfo( DBOI_FULLPATH,, nOrder )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF !Empty( cIndex )
|
||||
IF ! Empty( cIndex )
|
||||
IF ordBagClear( cIndex )
|
||||
lRet := FErase( cIndex ) != -1
|
||||
ENDIF
|
||||
@@ -346,7 +346,7 @@ FUNCTION sx_KillTag( xTag, xIndex )
|
||||
ENDIF
|
||||
ELSE
|
||||
IF HB_ISNUMERIC( xTag )
|
||||
IF Empty( xIndex ) .OR. !ValType( xIndex ) $ "CN"
|
||||
IF Empty( xIndex ) .OR. ! ValType( xIndex ) $ "CN"
|
||||
nOrder := xTag
|
||||
ELSEIF HB_ISSTRING( xIndex )
|
||||
IF xTag >= 1 .AND. xTag <= ordCount( xIndex )
|
||||
@@ -358,7 +358,7 @@ FUNCTION sx_KillTag( xTag, xIndex )
|
||||
nOrder := sx_TagOrder( xTag, xIndex )
|
||||
ENDIF
|
||||
ELSE
|
||||
IF Empty( xIndex ) .OR. !ValType( xIndex ) $ "CN"
|
||||
IF Empty( xIndex ) .OR. ! ValType( xIndex ) $ "CN"
|
||||
nOrder := ordNumber( xTag )
|
||||
ELSEIF HB_ISSTRING( xIndex )
|
||||
nOrder := sx_TagOrder( xTag, xIndex )
|
||||
@@ -410,7 +410,7 @@ FUNCTION rdd_Info( xID )
|
||||
LOCAL aInfo, cRDD
|
||||
|
||||
IF HB_ISNUMERIC( xID )
|
||||
IF !Empty( Alias( xID ) )
|
||||
IF ! Empty( Alias( xID ) )
|
||||
( xID )->( rddName() )
|
||||
ENDIF
|
||||
ELSEIF HB_ISSTRING( xID )
|
||||
|
||||
@@ -104,7 +104,7 @@ FUNCTION _sx_IniInit( nArea )
|
||||
cFile := hb_FNameMerge( cPath, cName, ".ini", cDrive )
|
||||
hIni := hb_iniRead( cFile, .F.,, .F. )
|
||||
|
||||
IF !Empty( hIni )
|
||||
IF ! Empty( hIni )
|
||||
IF hb_HHasKey( hIni, HB_SIX_SECTION )
|
||||
FOR EACH item IN hIni[ HB_SIX_SECTION ]
|
||||
SWITCH item:__enumKey()
|
||||
|
||||
@@ -404,7 +404,7 @@ STATIC FUNCTION AR_OPEN( nWA, aOpenInfo )
|
||||
ENDIF
|
||||
|
||||
/* Open file in exclusive mode */
|
||||
IF !aOpenInfo[ UR_OI_SHARED ]
|
||||
IF ! aOpenInfo[ UR_OI_SHARED ]
|
||||
IF aDBFData[ DATABASE_OPENNUMBER ] == 1
|
||||
aDBFData[ DATABASE_LOCKED ] := .T.
|
||||
|
||||
@@ -489,7 +489,7 @@ STATIC FUNCTION AR_PUTVALUE( nWA, nField, xValue )
|
||||
|
||||
AEval( aIndexes, {| aInd, n | aKeys[ n ] := Eval( aInd[ INDEX_ORCR, UR_ORCR_BKEY ] ) } )
|
||||
|
||||
IF !aWAData[ WADATA_EOF ]
|
||||
IF ! aWAData[ WADATA_EOF ]
|
||||
aRecords[ nRecNo ][ nField ] := xVal
|
||||
ENDIF
|
||||
|
||||
@@ -651,9 +651,9 @@ STATIC FUNCTION AR_SKIPFILTER( nWA, nRecords )
|
||||
nToSkip := iif( nRecords > 0, 1, iif( nRecords < 0, -1, 0 ) )
|
||||
|
||||
IF nToSkip != 0
|
||||
DO WHILE !aWAData[ WADATA_BOF ] .AND. !aWAData[ WADATA_EOF ]
|
||||
DO WHILE ! aWAData[ WADATA_BOF ] .AND. ! aWAData[ WADATA_EOF ]
|
||||
IF ( Set( _SET_DELETED ) .AND. aRecInfo[ aWAData[ WADATA_RECNO ] ][ RECDATA_DELETED ] ) .OR. ;
|
||||
( aWAData[ WADATA_FILTERINFO ] != NIL .AND. !Eval( aWAData[ WADATA_FILTERINFO, UR_FRI_BEXPR ] ) )
|
||||
( aWAData[ WADATA_FILTERINFO ] != NIL .AND. ! Eval( aWAData[ WADATA_FILTERINFO, UR_FRI_BEXPR ] ) )
|
||||
IF !( AR_SKIPRAW( nWA, nToSkip ) == HB_SUCCESS )
|
||||
RETURN HB_FAILURE
|
||||
ENDIF
|
||||
@@ -735,7 +735,7 @@ STATIC FUNCTION AR_SKIPRAW( nWA, nRecords )
|
||||
nResult := AR_GOTO( nWA, 0 )
|
||||
aWAData[ WADATA_ORDRECNO ] := 0
|
||||
ENDIF
|
||||
ELSEIF lScope0 .AND. !aIndexes[ nIndex, INDEX_RECORDS, nRec + nRecords + nIni, INDEXKEY_KEY ] >= aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_0 ] .OR. lScope1 .AND. !aIndexes[ nIndex, INDEX_RECORDS, nRec + nRecords + nIni, INDEXKEY_KEY ] <= aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_1 ]
|
||||
ELSEIF lScope0 .AND. ! aIndexes[ nIndex, INDEX_RECORDS, nRec + nRecords + nIni, INDEXKEY_KEY ] >= aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_0 ] .OR. lScope1 .AND. ! aIndexes[ nIndex, INDEX_RECORDS, nRec + nRecords + nIni, INDEXKEY_KEY ] <= aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_1 ]
|
||||
IF nRecords < 0
|
||||
IF aIndexes[ nIndex, INDEX_RECORDS, nIni + 1, INDEXKEY_KEY ]
|
||||
ENDIF
|
||||
@@ -977,7 +977,7 @@ STATIC FUNCTION AR_UNLOCK( nWA, nRec )
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "nWA = %1$d, nRec = %2$d", nWA, nRec ) )
|
||||
|
||||
IF !Empty( aRecords )
|
||||
IF ! Empty( aRecords )
|
||||
IF nRec == NIL /* Unlock All */
|
||||
FOR EACH nRec IN aRecords
|
||||
aRecInfo[ nRec, RECDATA_LOCKED ] := 0
|
||||
@@ -1037,7 +1037,7 @@ STATIC FUNCTION AR_PACK( nWA )
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "nWA = %1$d", nWA ) )
|
||||
|
||||
IF !aDBFData[ DATABASE_LOCKED ]
|
||||
IF ! aDBFData[ DATABASE_LOCKED ]
|
||||
oError := ErrorNew()
|
||||
oError:GenCode := EG_UNLOCKED
|
||||
oError:SubCode := 1022 /* EDBF_UNLOCKED */
|
||||
@@ -1299,7 +1299,7 @@ STATIC FUNCTION AR_ORDCREATE( nWA, aOrderCreate )
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "aWAData[ WADATA_EOF ] = %1$s", hb_ValToExp( aWAData[ WADATA_EOF ] ) ) )
|
||||
|
||||
DO WHILE !aWAData[ WADATA_EOF ] .AND. Eval( bEval ) .AND. Eval( bNext ) .AND. Eval( bWhile )
|
||||
DO WHILE ! aWAData[ WADATA_EOF ] .AND. Eval( bEval ) .AND. Eval( bNext ) .AND. Eval( bWhile )
|
||||
HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "aWAData[ WADATA_INDEX ] = %1$s, Eval( aIndex[ INDEX_ORCR, UR_ORCR_BKEY ] ) = %2$s, aIndex = %3$s, aWAData = %4$s", ;
|
||||
hb_ValToExp( aWAData[ WADATA_INDEX ] ), hb_ValToExp( Eval( aIndex[ INDEX_ORCR, UR_ORCR_BKEY ] ) ), ;
|
||||
hb_ValToExp( hb_ValToExp( aIndex ) ), hb_ValToExp( aWAData ) ) )
|
||||
@@ -1352,7 +1352,7 @@ STATIC FUNCTION AR_ORDINFO( nWA, nMsg, aOrderInfo )
|
||||
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WADATA_ORDRECNO ]
|
||||
ELSE
|
||||
nPos := Seek( aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_0 ], .T., .F., aIndexes[ nIndex ] )
|
||||
IF nPos > 0 .AND. !aIndexes[ nIndex, INDEX_RECORDS, nPos, INDEXKEY_KEY ] = aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_1 ]
|
||||
IF nPos > 0 .AND. ! aIndexes[ nIndex, INDEX_RECORDS, nPos, INDEXKEY_KEY ] = aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_1 ]
|
||||
IF nPos > 1 .AND. aIndexes[ nIndex, INDEX_RECORDS, nPos - 1, INDEXKEY_KEY ] >= aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_0 ]
|
||||
nPos--
|
||||
ELSE
|
||||
@@ -1368,7 +1368,7 @@ STATIC FUNCTION AR_ORDINFO( nWA, nMsg, aOrderInfo )
|
||||
aOrderInfo[ UR_ORI_RESULT ] := ""
|
||||
EXIT
|
||||
CASE DBOI_KEYCOUNT /* 26 */
|
||||
IF nIndex > 0 .AND. !Empty( aWAData[ WADATA_DATABASE, DATABASE_RECORDS ] )
|
||||
IF nIndex > 0 .AND. ! Empty( aWAData[ WADATA_DATABASE, DATABASE_RECORDS ] )
|
||||
IF aWAData[ WADATA_WAORDINFO, nIndex, WAOI_SCOPE_0 ] == NIL
|
||||
nPos := 0
|
||||
ELSE
|
||||
@@ -1885,12 +1885,12 @@ STATIC FUNCTION ModifyIndex( nIndex, xValue, aIndex, aWAData, xValorAnt )
|
||||
lFor := ( aOCInfo[ UR_ORC_BFOR ] == NIL .OR. Eval( aOCInfo[ UR_ORC_BFOR ] ) )
|
||||
lDel := .F.
|
||||
|
||||
IF xValorAnt != NIL .AND. ( !lFor .OR. !xValue == xValorAnt )
|
||||
IF xValorAnt != NIL .AND. ( ! lFor .OR. ! xValue == xValorAnt )
|
||||
ADel( aIndex[ INDEX_RECORDS ], Seek( xValorAnt, .F., .F., aIndex, aWAData[ WADATA_RECNO ] ) )
|
||||
lDel := .T.
|
||||
ENDIF
|
||||
|
||||
IF lFor .AND. !xValue == xValorAnt
|
||||
IF lFor .AND. ! xValue == xValorAnt
|
||||
nPos := Seek( xValue, .T., .T., aIndex )
|
||||
IF xValorAnt == NIL
|
||||
AAdd( aIndex[ INDEX_RECORDS ], NIL )
|
||||
@@ -1943,12 +1943,12 @@ STATIC FUNCTION Seek( xSeek, lSoft, lLast, aIndexInfo, nRec )
|
||||
bFirst := {|| aIndex[ 2, INDEXKEY_KEY ] >= xSeek }
|
||||
bBefore := {|| xSeek > aIndex[ nPos, INDEXKEY_KEY ] }
|
||||
bAfter := {|| xSeek < aIndex[ nPos, INDEXKEY_KEY ] }
|
||||
bAjust := {|| !aIndex[ nPos, INDEXKEY_KEY ] <= xSeek }
|
||||
bAjust := {|| ! aIndex[ nPos, INDEXKEY_KEY ] <= xSeek }
|
||||
ELSE
|
||||
bFirst := {|| aIndex[ 2, INDEXKEY_KEY ] <= xSeek }
|
||||
bBefore := {|| !aIndex[ nPos, INDEXKEY_KEY ] <= xSeek }
|
||||
bBefore := {|| ! aIndex[ nPos, INDEXKEY_KEY ] <= xSeek }
|
||||
bAfter := {|| xSeek > aIndex[ nPos, INDEXKEY_KEY ] }
|
||||
bAjust := {|| !aIndex[ nPos, INDEXKEY_KEY ] >= xSeek }
|
||||
bAjust := {|| ! aIndex[ nPos, INDEXKEY_KEY ] >= xSeek }
|
||||
ENDIF
|
||||
|
||||
IF aIndex[ 2 ] != NIL .AND. Eval( bFirst )
|
||||
@@ -1980,7 +1980,7 @@ STATIC FUNCTION Seek( xSeek, lSoft, lLast, aIndexInfo, nRec )
|
||||
nPos := 1
|
||||
ENDIF
|
||||
IF nRec != NIL
|
||||
IF nIni <= nEnd .AND. !Empty( aIndex ) .AND. aIndex[ nPos ] != NIL .AND. nRec != aIndex[ nPos, INDEXKEY_RECORD ]
|
||||
IF nIni <= nEnd .AND. ! Empty( aIndex ) .AND. aIndex[ nPos ] != NIL .AND. nRec != aIndex[ nPos, INDEXKEY_RECORD ]
|
||||
nEnd := Len( aIndex )
|
||||
FOR nPos := nIni TO nEnd
|
||||
IF aIndex[ nPos ] == NIL .OR. !( xSeek == aIndex[ nPos, INDEXKEY_KEY ] ) /* TOFIX: == comparison? */
|
||||
@@ -1994,7 +1994,7 @@ STATIC FUNCTION Seek( xSeek, lSoft, lLast, aIndexInfo, nRec )
|
||||
nPos := 0
|
||||
ENDIF
|
||||
ENDIF
|
||||
ELSEIF !lSoft
|
||||
ELSEIF ! lSoft
|
||||
IF nPos > Len( aIndex ) .OR. !( aIndex[ nPos, INDEXKEY_KEY ] == xSeek ) /* TOFIX: == comparison? */
|
||||
nPos := 0
|
||||
ENDIF
|
||||
@@ -2009,7 +2009,7 @@ STATIC FUNCTION SeekScope( aIndex, aOrdInfo, lBottom )
|
||||
|
||||
LOCAL nPos := Seek( aOrdInfo[ WAOI_SCOPE_0 ], .T., lBottom, aIndex )
|
||||
|
||||
IF nPos > 0 .AND. !aIndex[ INDEX_RECORDS, nPos, INDEXKEY_KEY ] == aOrdInfo[ WAOI_SCOPE_1 ] /* TOFIX: == comparison? */
|
||||
IF nPos > 0 .AND. ! aIndex[ INDEX_RECORDS, nPos, INDEXKEY_KEY ] == aOrdInfo[ WAOI_SCOPE_1 ] /* TOFIX: == comparison? */
|
||||
IF nPos > 1 .AND. aIndex[ INDEX_RECORDS, nPos - 1, INDEXKEY_KEY ] >= aOrdInfo[ WAOI_SCOPE_0 ]
|
||||
nPos--
|
||||
ELSE
|
||||
|
||||
@@ -112,7 +112,7 @@ STATIC FUNCTION _HSX_GOCOLD( nWA )
|
||||
IF nResult == HB_SUCCESS
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
IF aWData[ 1 ]
|
||||
IF !Empty( aWData[ 2 ] )
|
||||
IF ! Empty( aWData[ 2 ] )
|
||||
nRecNo := RecNo()
|
||||
/* update HSX indexes */
|
||||
FOR EACH nHSX IN aWData[ 2 ]
|
||||
@@ -164,8 +164,8 @@ FUNCTION HSX_CREATE( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
|
||||
|
||||
LOCAL aWData, nHsx := -1, nOpenMode
|
||||
|
||||
IF !Used()
|
||||
ELSEIF !rddName() == "HSCDX"
|
||||
IF ! Used()
|
||||
ELSEIF ! rddName() == "HSCDX"
|
||||
ELSE
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nOpenMode := iif( dbInfo( DBI_SHARED ), 1, 0 ) + ;
|
||||
@@ -184,8 +184,8 @@ FUNCTION HSX_OPEN( cFile, nBufSize )
|
||||
|
||||
LOCAL aWData, nHsx, nOpenMode
|
||||
|
||||
IF !Used()
|
||||
ELSEIF !rddName() == "HSCDX"
|
||||
IF ! Used()
|
||||
ELSEIF ! rddName() == "HSCDX"
|
||||
ELSE
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nOpenMode := iif( dbInfo( DBI_SHARED ), 1, 0 ) + ;
|
||||
|
||||
@@ -116,7 +116,7 @@ ENDCLASS
|
||||
|
||||
METHOD setFocus() CLASS CHECKBOX
|
||||
|
||||
IF !::lHasFocus
|
||||
IF ! ::lHasFocus
|
||||
::nCursor := SetCursor( SC_NONE )
|
||||
::lHasFocus := .T.
|
||||
::display()
|
||||
@@ -132,7 +132,7 @@ METHOD select( lState ) CLASS CHECKBOX
|
||||
|
||||
LOCAL lOldState := ::lBuffer
|
||||
|
||||
::lBuffer := iif( HB_ISLOGICAL( lState ), lState, !::lBuffer )
|
||||
::lBuffer := iif( HB_ISLOGICAL( lState ), lState, ! ::lBuffer )
|
||||
|
||||
IF lOldState != ::lBuffer
|
||||
::display()
|
||||
@@ -202,7 +202,7 @@ METHOD display() CLASS CHECKBOX
|
||||
hb_DispOutAt( ::nRow, ::nCol, Left( cStyle, 1 ), cColor )
|
||||
hb_DispOutAt( ::nRow, ::nCol + 2, Right( cStyle, 1 ), cColor )
|
||||
|
||||
IF !Empty( cCaption := ::cCaption )
|
||||
IF ! Empty( cCaption := ::cCaption )
|
||||
|
||||
IF ( nPos := At( "&", cCaption ) ) == 0
|
||||
ELSEIF nPos == Len( cCaption )
|
||||
@@ -217,7 +217,7 @@ METHOD display() CLASS CHECKBOX
|
||||
|
||||
hb_DispOutAt( ::nCapRow, ::nCapCol, cCaption, cColor )
|
||||
|
||||
IF !::lHasFocus .AND. nPos != 0
|
||||
IF ! ::lHasFocus .AND. nPos != 0
|
||||
hb_DispOutAt( ::nCapRow, ::nCapCol + nPos - 1, SubStr( cCaption, nPos, 1 ), ;
|
||||
hb_ColorIndex( ::cColorSpec, 3 ) )
|
||||
ENDIF
|
||||
@@ -275,7 +275,7 @@ METHOD colorSpec( cColorSpec ) CLASS CHECKBOX
|
||||
|
||||
IF cColorSpec != NIL
|
||||
::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001, ;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 3 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 4 ) ) } )
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 3 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 4 ) ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN ::cColorSpec
|
||||
|
||||
@@ -77,7 +77,7 @@ FUNCTION dbEdit( nTop, nLeft, nBottom, nRight, ;
|
||||
LOCAL oColumn
|
||||
LOCAL aCol
|
||||
|
||||
IF !Used()
|
||||
IF ! Used()
|
||||
RETURN .F.
|
||||
ELSEIF Eof()
|
||||
dbGoBottom()
|
||||
@@ -106,7 +106,7 @@ FUNCTION dbEdit( nTop, nLeft, nBottom, nRight, ;
|
||||
IF HB_ISARRAY( acColumns )
|
||||
nColCount := 0
|
||||
FOR EACH aCol IN acColumns
|
||||
IF HB_ISSTRING( aCol ) .AND. !Empty( aCol )
|
||||
IF HB_ISSTRING( aCol ) .AND. ! Empty( aCol )
|
||||
nColCount++
|
||||
ELSE
|
||||
EXIT
|
||||
@@ -158,9 +158,9 @@ FUNCTION dbEdit( nTop, nLeft, nBottom, nRight, ;
|
||||
|
||||
oColumn := TBColumnNew( cHeading, bBlock )
|
||||
|
||||
IF HB_ISARRAY( xColumnSayPictures ) .AND. nPos <= Len( xColumnSayPictures ) .AND. HB_ISSTRING( xColumnSayPictures[ nPos ] ) .AND. !Empty( xColumnSayPictures[ nPos ] )
|
||||
IF HB_ISARRAY( xColumnSayPictures ) .AND. nPos <= Len( xColumnSayPictures ) .AND. HB_ISSTRING( xColumnSayPictures[ nPos ] ) .AND. ! Empty( xColumnSayPictures[ nPos ] )
|
||||
oColumn:picture := xColumnSayPictures[ nPos ]
|
||||
ELSEIF HB_ISSTRING( xColumnSayPictures ) .AND. !Empty( xColumnSayPictures )
|
||||
ELSEIF HB_ISSTRING( xColumnSayPictures ) .AND. ! Empty( xColumnSayPictures )
|
||||
oColumn:picture := xColumnSayPictures
|
||||
ENDIF
|
||||
|
||||
@@ -297,10 +297,10 @@ STATIC FUNCTION CallUser( oBrowse, xUserFunc, nKey, lAppend, lFlag )
|
||||
|
||||
LOCAL nAction
|
||||
LOCAL nMode := ;
|
||||
iif( nKey != 0, DE_EXCEPT, ;
|
||||
iif( !lAppend .AND. IsDbEmpty(), DE_EMPTY, ;
|
||||
iif( oBrowse:hitBottom, DE_HITBOTTOM, ;
|
||||
iif( oBrowse:hitTop, DE_HITTOP, DE_IDLE ) ) ) )
|
||||
iif( nKey != 0, DE_EXCEPT, ;
|
||||
iif( ! lAppend .AND. IsDbEmpty(), DE_EMPTY, ;
|
||||
iif( oBrowse:hitBottom, DE_HITBOTTOM, ;
|
||||
iif( oBrowse:hitTop, DE_HITTOP, DE_IDLE ) ) ) )
|
||||
|
||||
oBrowse:forceStable()
|
||||
|
||||
@@ -311,11 +311,11 @@ STATIC FUNCTION CallUser( oBrowse, xUserFunc, nKey, lAppend, lFlag )
|
||||
replicating this behavior. */
|
||||
nAction := iif( HB_ISBLOCK( xUserFunc ), ;
|
||||
Eval( xUserFunc, nMode, oBrowse:colPos ), ;
|
||||
iif( HB_ISSTRING( xUserFunc ) .AND. !Empty( xUserFunc ), ;
|
||||
iif( HB_ISSTRING( xUserFunc ) .AND. ! Empty( xUserFunc ), ;
|
||||
&xUserFunc( nMode, oBrowse:colPos ), ;
|
||||
iif( nKey == K_ENTER .OR. nKey == K_ESC, DE_ABORT, DE_CONT ) ) )
|
||||
|
||||
IF !lAppend .AND. Eof() .AND. !IsDbEmpty()
|
||||
IF ! lAppend .AND. Eof() .AND. ! IsDbEmpty()
|
||||
dbSkip( -1 )
|
||||
ENDIF
|
||||
|
||||
@@ -340,7 +340,7 @@ STATIC FUNCTION CallUser( oBrowse, xUserFunc, nKey, lAppend, lFlag )
|
||||
lAppend := .F.
|
||||
|
||||
IF ( Set( _SET_DELETED ) .AND. Deleted() ) .OR. ;
|
||||
( !Empty( dbFilter() ) .AND. !&( dbFilter() ) )
|
||||
( ! Empty( dbFilter() ) .AND. ! &( dbFilter() ) )
|
||||
dbSkip()
|
||||
ENDIF
|
||||
IF Eof()
|
||||
@@ -378,7 +378,7 @@ STATIC FUNCTION Skipped( nRecs, lAppend )
|
||||
|
||||
IF LastRec() != 0
|
||||
IF nRecs == 0
|
||||
IF Eof() .AND. !lAppend
|
||||
IF Eof() .AND. ! lAppend
|
||||
dbSkip( -1 )
|
||||
nSkipped := -1
|
||||
ELSE
|
||||
|
||||
@@ -313,7 +313,7 @@ FUNCTION RangeCheck( oGet, xDummy, xLow, xHigh )
|
||||
|
||||
HB_SYMBOL_UNUSED( xDummy )
|
||||
|
||||
IF !oGet:changed
|
||||
IF ! oGet:changed
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -124,10 +124,10 @@ FUNCTION __i18n_potArrayLoad( cFile, cErrorMsg )
|
||||
IF hb_utf8Asc( cValue ) == _BOM_VALUE
|
||||
cValue := SubStr( cValue, Len( _UTF8_BOM ) + 1 )
|
||||
ENDIF
|
||||
IF !hb_eol() == _I18N_EOL
|
||||
IF ! hb_eol() == _I18N_EOL
|
||||
cValue := StrTran( cValue, hb_eol(), _I18N_EOL )
|
||||
ENDIF
|
||||
IF !hb_eol() == Chr( 13 ) + Chr( 10 )
|
||||
IF ! hb_eol() == Chr( 13 ) + Chr( 10 )
|
||||
cValue := StrTran( cValue, Chr( 13 ) + Chr( 10 ), _I18N_EOL )
|
||||
ENDIF
|
||||
aLines := hb_ATokens( cValue, _I18N_EOL )
|
||||
@@ -231,7 +231,7 @@ FUNCTION __i18n_potArrayLoad( cFile, cErrorMsg )
|
||||
WHILE SubStr( cLine, n, 1 ) == " "
|
||||
++n
|
||||
ENDDO
|
||||
IF !SubStr( cLine, n, 1 ) == "]"
|
||||
IF ! SubStr( cLine, n, 1 ) == "]"
|
||||
nIndex := -1
|
||||
ENDIF
|
||||
cLine := LTrim( SubStr( cLine, n + 1 ) )
|
||||
@@ -339,7 +339,7 @@ FUNCTION __i18n_potArraySave( cFile, aTrans, cErrorMsg, lVersionNo, lSourceRef )
|
||||
"#" + cEol
|
||||
FOR EACH aItem IN aTrans
|
||||
cPOT += cEol
|
||||
IF lSourceRef .AND. !Empty( aItem[ _I18N_SOURCE ] )
|
||||
IF lSourceRef .AND. ! Empty( aItem[ _I18N_SOURCE ] )
|
||||
cPOT += "#: "
|
||||
cPOT += aItem[ _I18N_SOURCE ]
|
||||
cPOT += cEol
|
||||
@@ -401,7 +401,7 @@ FUNCTION __i18n_potArrayToHash( aTrans, lEmpty, hI18N )
|
||||
hTrans := hI18N[ "CONTEXT" ]
|
||||
|
||||
FOR EACH aItem IN aTrans
|
||||
IF lEmpty .OR. !Empty( aItem[ _I18N_MSGSTR, 1 ] )
|
||||
IF lEmpty .OR. ! Empty( aItem[ _I18N_MSGSTR, 1 ] )
|
||||
cContext := aItem[ _I18N_CONTEXT ]
|
||||
IF ! cContext $ hTrans
|
||||
hTrans[ cContext ] := hContext := { => }
|
||||
@@ -465,7 +465,7 @@ FUNCTION __i18n_hashJoin( hTrans, hTrans2 )
|
||||
ELSE
|
||||
hDstCtx := hContext[ hCtx:__enumKey() ]
|
||||
FOR EACH xTrans IN hCtx
|
||||
IF !Empty( xTrans ) .AND. ;
|
||||
IF ! Empty( xTrans ) .AND. ;
|
||||
( ! xTrans:__enumKey() $ hDstCtx .OR. ;
|
||||
Empty( hDstCtx[ xTrans:__enumKey() ] ) )
|
||||
hDstCtx[ xTrans:__enumKey() ] := iif( HB_ISARRAY( xTrans ), ;
|
||||
@@ -500,7 +500,7 @@ FUNCTION __i18n_potArrayJoin( aTrans, aTrans2, hIndex )
|
||||
IF aItem[ _I18N_PLURAL ]
|
||||
aDest[ _I18N_PLURAL ] := .T.
|
||||
ENDIF
|
||||
IF !Empty( aItem[ _I18N_SOURCE ] )
|
||||
IF ! Empty( aItem[ _I18N_SOURCE ] )
|
||||
IF Empty( aDest[ _I18N_SOURCE ] )
|
||||
aDest[ _I18N_SOURCE ] := aItem[ _I18N_SOURCE ]
|
||||
ELSE
|
||||
@@ -513,7 +513,7 @@ FUNCTION __i18n_potArrayJoin( aTrans, aTrans2, hIndex )
|
||||
NEXT
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF !Empty( aItem[ _I18N_MSGSTR ] ) .AND. ;
|
||||
IF ! Empty( aItem[ _I18N_MSGSTR ] ) .AND. ;
|
||||
( Empty( aDest[ _I18N_MSGSTR ] ) .OR. ;
|
||||
( Len( aDest[ _I18N_MSGSTR ] ) == 1 .AND. ;
|
||||
Empty( aDest[ _I18N_MSGSTR, 1 ] ) ) )
|
||||
|
||||
@@ -267,7 +267,7 @@ METHOD display() CLASS LISTBOX
|
||||
ENDIF
|
||||
|
||||
IF ::lIsOpen
|
||||
IF !Empty( cHotBox )
|
||||
IF ! Empty( cHotBox )
|
||||
|
||||
cColorScrl := hb_ColorIndex( ::cColorSpec, 4 )
|
||||
hb_Scroll( nTop, nLeft, ::nBottom, ::nRight,,, cColorScrl )
|
||||
@@ -293,7 +293,7 @@ METHOD display() CLASS LISTBOX
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cCaption := ::cCaption )
|
||||
IF ! Empty( cCaption := ::cCaption )
|
||||
|
||||
IF ( nPos := At( "&", cCaption ) ) == 0
|
||||
ELSEIF nPos == Len( cCaption )
|
||||
@@ -909,8 +909,8 @@ METHOD colorSpec( cColorSpec ) CLASS LISTBOX
|
||||
IF cColorSpec != NIL
|
||||
::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001, ;
|
||||
iif( ::lDropDown, ;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 7 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 8 ) ) }, ;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 6 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 7 ) ) } ) )
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 7 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 8 ) ) }, ;
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 6 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 7 ) ) } ) )
|
||||
ENDIF
|
||||
|
||||
RETURN ::cColorSpec
|
||||
@@ -921,7 +921,7 @@ METHOD dropDown( lDropDown ) CLASS LISTBOX
|
||||
|
||||
::lDropDown := __eInstVar53( Self, "DROPDOWN", lDropDown, "L", 1001 )
|
||||
|
||||
IF !::lDropDown .AND. !::lIsOpen
|
||||
IF ! ::lDropDown .AND. ! ::lIsOpen
|
||||
::lIsOpen := .T.
|
||||
ENDIF
|
||||
|
||||
@@ -1075,7 +1075,7 @@ METHOD New( nTop, nLeft, nBottom, nRight, lDropDown )
|
||||
::nLeft := nLeft
|
||||
::nCapCol := nLeft
|
||||
::nCapRow := nTop
|
||||
::lIsOpen := !lDropDown
|
||||
::lIsOpen := ! lDropDown
|
||||
::lDropDown := lDropDown
|
||||
::aSaveScr := { nTop + 1, nleft, nBottom, nRight, SaveScreen( nTop + 1, nLeft, nBottom, nRight ) }
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ METHOD gatherFunctions() CLASS HBProfile
|
||||
IF __dynSIsFun( n )
|
||||
|
||||
// If we're not ignoring the symbol...
|
||||
IF !::ignoreSymbol( cName := __dynSGetName( n ) )
|
||||
IF ! ::ignoreSymbol( cName := __dynSGetName( n ) )
|
||||
// Yes, it is, add it to the profile.
|
||||
AAdd( ::aProfile, HBProfileFunction():new( cName, __dynSGetPRF( n ) ) )
|
||||
ENDIF
|
||||
@@ -288,10 +288,10 @@ METHOD gatherMethods() CLASS HBProfile
|
||||
LOCAL nMember
|
||||
|
||||
// For each class in the environment...
|
||||
DO WHILE !Empty( cClass := __className( n ) )
|
||||
DO WHILE ! Empty( cClass := __className( n ) )
|
||||
|
||||
// If we're not ignoring the class' methods...
|
||||
IF !::ignoreSymbol( cClass )
|
||||
IF ! ::ignoreSymbol( cClass )
|
||||
|
||||
// Collect class members.
|
||||
nMembers := Len( aMembers := __classSel( n ) )
|
||||
@@ -299,7 +299,7 @@ METHOD gatherMethods() CLASS HBProfile
|
||||
FOR nMember := 1 TO nMembers
|
||||
|
||||
// If we've got a member name...
|
||||
IF !Empty( aMembers[ nMember ] )
|
||||
IF ! Empty( aMembers[ nMember ] )
|
||||
// Add it to the profile.
|
||||
AAdd( ::aProfile, HBProfileMethod():new( cClass + ":" + aMembers[ nMember ], __GetMsgPrf( n, aMembers[ nMember ] ) ) )
|
||||
ENDIF
|
||||
|
||||
@@ -118,7 +118,7 @@ ENDCLASS
|
||||
|
||||
METHOD setFocus() CLASS PUSHBUTTON
|
||||
|
||||
IF !::lHasFocus
|
||||
IF ! ::lHasFocus
|
||||
::lHasFocus := .T.
|
||||
::display()
|
||||
|
||||
@@ -228,7 +228,7 @@ METHOD display() CLASS PUSHBUTTON
|
||||
cCaption := Stuff( cCaption, nPos, 1, "" )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cStyle )
|
||||
IF ! Empty( cStyle )
|
||||
|
||||
nCol++
|
||||
|
||||
@@ -241,7 +241,7 @@ METHOD display() CLASS PUSHBUTTON
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cCaption )
|
||||
IF ! Empty( cCaption )
|
||||
|
||||
hb_DispOutAt( nRow, nCol, cCaption, cColor )
|
||||
|
||||
@@ -286,7 +286,7 @@ METHOD colorSpec( cColorSpec ) CLASS PUSHBUTTON
|
||||
|
||||
IF cColorSpec != NIL
|
||||
::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001,;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 3 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 5 ) ) } )
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 3 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 5 ) ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN ::cColorSpec
|
||||
|
||||
@@ -113,7 +113,7 @@ ENDCLASS
|
||||
|
||||
METHOD setFocus() CLASS RADIOBUTTN
|
||||
|
||||
IF !::lHasFocus
|
||||
IF ! ::lHasFocus
|
||||
::lHasFocus := .T.
|
||||
::display()
|
||||
|
||||
@@ -128,7 +128,7 @@ METHOD select( lState ) CLASS RADIOBUTTN
|
||||
|
||||
LOCAL lOldState := ::lBuffer
|
||||
|
||||
::lBuffer := iif( HB_ISLOGICAL( lState ), lState, !::lBuffer )
|
||||
::lBuffer := iif( HB_ISLOGICAL( lState ), lState, ! ::lBuffer )
|
||||
|
||||
IF lOldState != ::lBuffer .AND. ;
|
||||
HB_ISBLOCK( ::bSBlock )
|
||||
@@ -166,7 +166,7 @@ METHOD display() CLASS RADIOBUTTN
|
||||
iif( ::lBuffer, SubStr( cStyle, 2, 1 ), SubStr( cStyle, 3, 1 ) ) + ;
|
||||
Right( cStyle, 1 ), cColor )
|
||||
|
||||
IF !Empty( cOldCaption := ::cCaption )
|
||||
IF ! Empty( cOldCaption := ::cCaption )
|
||||
|
||||
IF ( nPos := At( "&", cOldCaption ) ) == 0
|
||||
ELSEIF nPos == Len( cOldCaption )
|
||||
@@ -280,7 +280,7 @@ METHOD colorSpec( cColorSpec ) CLASS RADIOBUTTN
|
||||
|
||||
IF cColorSpec != NIL
|
||||
::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001, ;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 6 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 7 ) ) } )
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 6 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 7 ) ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN ::cColorSpec
|
||||
|
||||
@@ -176,13 +176,13 @@ METHOD display() CLASS RADIOGROUP
|
||||
cUnSelBox := ::cHotBox
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cSelBox )
|
||||
IF ! Empty( cSelBox )
|
||||
hb_DispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, cSelBox, hb_ColorIndex( ::cColorSpec, 0 ) )
|
||||
ELSEIF !Empty( cUnSelBox )
|
||||
ELSEIF ! Empty( cUnSelBox )
|
||||
hb_DispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, cUnSelBox, hb_ColorIndex( ::cColorSpec, 0 ) )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cCaption := ::cCaption )
|
||||
IF ! Empty( cCaption := ::cCaption )
|
||||
|
||||
IF !( ( nPos := At( "&", cCaption ) ) == 0 )
|
||||
IF nPos == Len( cCaption )
|
||||
@@ -356,7 +356,7 @@ METHOD setFocus() CLASS RADIOGROUP
|
||||
|
||||
LOCAL nOldMCur
|
||||
|
||||
IF !::lHasFocus
|
||||
IF ! ::lHasFocus
|
||||
|
||||
::nCursor := SetCursor( SC_NONE )
|
||||
::lHasFocus := .T.
|
||||
@@ -554,7 +554,7 @@ METHOD colorSpec( cColorSpec ) CLASS RADIOGROUP
|
||||
|
||||
IF cColorSpec != NIL
|
||||
::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001, ;
|
||||
{|| !Empty( hb_ColorIndex( cColorSpec, 2 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 3 ) ) } )
|
||||
{|| ! Empty( hb_ColorIndex( cColorSpec, 2 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 3 ) ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN ::cColorSpec
|
||||
|
||||
@@ -445,7 +445,7 @@ METHOD dispFrames() CLASS TBROWSE
|
||||
|
||||
DispBegin()
|
||||
|
||||
IF ::lInvalid .AND. !Empty( ::cBorder )
|
||||
IF ::lInvalid .AND. ! Empty( ::cBorder )
|
||||
hb_DispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, ::cBorder, ::colorValue( _TBC_CLR_STANDARD ) )
|
||||
ENDIF
|
||||
|
||||
@@ -612,7 +612,7 @@ METHOD readRecord( nRow ) CLASS TBROWSE
|
||||
LOCAL nRowCount := ::rowCount
|
||||
LOCAL lRead := .F.
|
||||
|
||||
IF nRow >= 1 .AND. nRow <= nRowCount .AND. !::aCellStatus[ nRow ]
|
||||
IF nRow >= 1 .AND. nRow <= nRowCount .AND. ! ::aCellStatus[ nRow ]
|
||||
|
||||
IF nRow <= ::nLastRow
|
||||
nToMove := nRow - ::nBufferPos
|
||||
@@ -752,7 +752,7 @@ METHOD stabilize() CLASS TBROWSE
|
||||
::doConfigure()
|
||||
ENDIF
|
||||
|
||||
IF !::lStable .OR. ::lInvalid .OR. ::lFrames .OR. ::lRefresh .OR. ;
|
||||
IF ! ::lStable .OR. ::lInvalid .OR. ::lFrames .OR. ::lRefresh .OR. ;
|
||||
::nMoveOffset != 0 .OR. ::nBufferPos != ::nRowPos
|
||||
|
||||
nRowCount := ::rowCount
|
||||
@@ -779,7 +779,7 @@ METHOD stabilize() CLASS TBROWSE
|
||||
|
||||
IF ::nLastScroll > 0
|
||||
FOR EACH lStat, lDisp IN ::aCellStatus, ::aDispStatus DESCEND
|
||||
IF !lStat
|
||||
IF ! lStat
|
||||
IF lRead
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
@@ -791,7 +791,7 @@ METHOD stabilize() CLASS TBROWSE
|
||||
NEXT
|
||||
ELSE
|
||||
FOR EACH lStat, lDisp IN ::aCellStatus, ::aDispStatus
|
||||
IF !lStat
|
||||
IF ! lStat
|
||||
IF lRead
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
@@ -849,14 +849,14 @@ METHOD forceStable() CLASS TBROWSE
|
||||
* be changed. I'll change it in the future but first I will have
|
||||
* to revert my stupid modifications in Harbour core code. Looking
|
||||
* at old TBrowse implementation I replaced some:
|
||||
* DO WHILE !oBrw:stabilize(); ENDDO
|
||||
* DO WHILE ! oBrw:stabilize(); ENDDO
|
||||
* with:
|
||||
* oBrw:forceStable()
|
||||
* In Clipper it's not the same because oBrw:forceStable()
|
||||
* may not set cursor position and only ::stabilize() does it.
|
||||
* [druzus]
|
||||
*/
|
||||
DO WHILE !::stabilize()
|
||||
DO WHILE ! ::stabilize()
|
||||
ENDDO
|
||||
|
||||
RETURN Self
|
||||
@@ -1677,7 +1677,7 @@ STATIC PROCEDURE _SETVISIBLE( aColData, nWidth, nFrozen, nLeft, nRight )
|
||||
aColData[ nRight ][ _TBCI_CELLWIDTH ] > 0
|
||||
lLeft := nLeft > nFrozen .AND. nLeft <= nColCount .AND. ;
|
||||
aColData[ nLeft ][ _TBCI_CELLWIDTH ] > 0
|
||||
IF !lLeft
|
||||
IF ! lLeft
|
||||
IF lRight
|
||||
IF ( nLeft := _PREVCOLUMN( aColData, nRight ) ) < nFrozen
|
||||
nLeft := nRight
|
||||
@@ -2285,7 +2285,7 @@ METHOD nTop( nTop ) CLASS TBROWSE
|
||||
IF nTop != NIL
|
||||
#ifdef HB_COMPAT_C53
|
||||
::n_Top := __eInstVar53( Self, "NTOP", nTop, "N", 1001 )
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
::n_Top++
|
||||
ENDIF
|
||||
#else
|
||||
@@ -2295,7 +2295,7 @@ METHOD nTop( nTop ) CLASS TBROWSE
|
||||
ENDIF
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
RETURN ::n_Top - 1
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2308,7 +2308,7 @@ METHOD nLeft( nLeft ) CLASS TBROWSE
|
||||
IF nLeft != NIL
|
||||
#ifdef HB_COMPAT_C53
|
||||
::n_Left := __eInstVar53( Self, "NLEFT", nLeft, "N", 1001 )
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
::n_Left++
|
||||
ENDIF
|
||||
#else
|
||||
@@ -2318,7 +2318,7 @@ METHOD nLeft( nLeft ) CLASS TBROWSE
|
||||
ENDIF
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
RETURN ::n_Left - 1
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2331,7 +2331,7 @@ METHOD nBottom( nBottom ) CLASS TBROWSE
|
||||
IF nBottom != NIL
|
||||
::n_Bottom := __eInstVar53( Self, "NBOTTOM", nBottom, "N", 1001, {| o, x | x >= o:nTop } )
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
::n_Bottom--
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2339,7 +2339,7 @@ METHOD nBottom( nBottom ) CLASS TBROWSE
|
||||
ENDIF
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
RETURN ::n_Bottom + 1
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2352,7 +2352,7 @@ METHOD nRight( nRight ) CLASS TBROWSE
|
||||
IF nRight != NIL
|
||||
::n_Right := __eInstVar53( Self, "NRIGHT", nRight, "N", 1001, {| o, x | x >= o:nLeft } )
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
::n_Right--
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2360,7 +2360,7 @@ METHOD nRight( nRight ) CLASS TBROWSE
|
||||
ENDIF
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
RETURN ::n_Right + 1
|
||||
ENDIF
|
||||
#endif
|
||||
@@ -2413,7 +2413,7 @@ METHOD hitTest( mRow, mCol ) CLASS TBROWSE
|
||||
|
||||
nRet := HTNOWHERE
|
||||
|
||||
IF !Empty( ::cBorder )
|
||||
IF ! Empty( ::cBorder )
|
||||
IF mRow == nTop - 1
|
||||
IF mCol == nLeft - 1
|
||||
nRet := HTTOPLEFT
|
||||
@@ -2577,13 +2577,13 @@ METHOD border( cBorder ) CLASS TBROWSE
|
||||
|
||||
IF Len( cBorder ) == 0 .OR. Len( cBorder ) == 8
|
||||
|
||||
IF Empty( ::cBorder ) .AND. !Empty( cBorder )
|
||||
IF Empty( ::cBorder ) .AND. ! Empty( cBorder )
|
||||
::n_Top++
|
||||
::n_Left++
|
||||
::n_Bottom--
|
||||
::n_Right--
|
||||
::configure( _TBR_CONF_COLUMNS )
|
||||
ELSEIF !Empty( ::cBorder ) .AND. Empty( cBorder )
|
||||
ELSEIF ! Empty( ::cBorder ) .AND. Empty( cBorder )
|
||||
::n_Top--
|
||||
::n_Left--
|
||||
::n_Bottom++
|
||||
|
||||
@@ -294,7 +294,7 @@ METHOD display() CLASS GET
|
||||
|
||||
/* Handle C5.3 caption. */
|
||||
|
||||
IF !Empty( ::cCaption )
|
||||
IF ! Empty( ::cCaption )
|
||||
|
||||
cCaption := ::cCaption
|
||||
IF ( nPos := At( "&", cCaption ) ) > 0
|
||||
@@ -325,7 +325,7 @@ METHOD display() CLASS GET
|
||||
|
||||
/* Display the GET */
|
||||
|
||||
IF !::lSuppDisplay .OR. nDispPos != ::nOldPos
|
||||
IF ! ::lSuppDisplay .OR. nDispPos != ::nOldPos
|
||||
|
||||
hb_DispOutAt( ::nRow, ::nCol, ;
|
||||
iif( ::lHideInput, PadR( Replicate( SubStr( ::cStyle, 1, 1 ), Len( RTrim( cBuffer ) ) ), ::nDispLen ), SubStr( cBuffer, nDispPos, ::nDispLen ) ), ;
|
||||
@@ -334,7 +334,7 @@ METHOD display() CLASS GET
|
||||
nRowPos := ::nRow
|
||||
nColPos := ::nCol + Min( ::nDispLen, Len( cBuffer ) )
|
||||
|
||||
IF Set( _SET_DELIMITERS ) .AND. !::hasFocus
|
||||
IF Set( _SET_DELIMITERS ) .AND. ! ::hasFocus
|
||||
#ifdef HB_COMPAT_C53
|
||||
hb_DispOutAt( nRowPos, ::nCol - 1, SubStr( Set( _SET_DELIMCHARS ), 1, 1 ), hb_ColorIndex( ::cColorSpec, GET_CLR_UNSELECTED ) )
|
||||
hb_DispOutAt( nRowPos, nColPos , SubStr( Set( _SET_DELIMCHARS ), 2, 1 ), hb_ColorIndex( ::cColorSpec, GET_CLR_UNSELECTED ) )
|
||||
@@ -441,7 +441,7 @@ METHOD setFocus() CLASS GET
|
||||
|
||||
LOCAL xVarGet
|
||||
|
||||
IF !::hasFocus
|
||||
IF ! ::hasFocus
|
||||
|
||||
xVarGet := ::xVarGet := ::varGet()
|
||||
|
||||
@@ -658,7 +658,7 @@ METHOD insert( cChar ) CLASS GET
|
||||
IF ::lPicComplex
|
||||
/* Calculating different nMaxEdit for ::lPicComplex */
|
||||
FOR nFor := ::nPos TO nMaxEdit
|
||||
IF !::IsEditable( nFor )
|
||||
IF ! ::IsEditable( nFor )
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -721,7 +721,7 @@ METHOD wordLeft() CLASS GET
|
||||
DO WHILE nPos > 1 .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
nPos--
|
||||
ENDDO
|
||||
DO WHILE nPos > 1 .AND. ! ( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
DO WHILE nPos > 1 .AND. !( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
nPos--
|
||||
ENDDO
|
||||
|
||||
@@ -749,7 +749,7 @@ METHOD wordRight() CLASS GET
|
||||
|
||||
nPos := ::nPos
|
||||
|
||||
DO WHILE nPos < ::nMaxEdit .AND. ! ( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
DO WHILE nPos < ::nMaxEdit .AND. !( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
nPos++
|
||||
ENDDO
|
||||
DO WHILE nPos < ::nMaxEdit .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
@@ -1182,8 +1182,8 @@ METHOD PutMask( xValue, lEdit ) CLASS GET
|
||||
|
||||
cBuffer := Transform( xValue, ;
|
||||
iif( Empty( cPicFunc ), ;
|
||||
iif( ::lPicBlankZero .AND. !::hasFocus, "@Z ", "" ), ;
|
||||
cPicFunc + iif( ::lPicBlankZero .AND. !::hasFocus, "Z" , "" ) + " " ) ;
|
||||
iif( ::lPicBlankZero .AND. ! ::hasFocus, "@Z ", "" ), ;
|
||||
cPicFunc + iif( ::lPicBlankZero .AND. ! ::hasFocus, "Z" , "" ) + " " ) ;
|
||||
+ cPicMask )
|
||||
|
||||
IF ::cType == "N"
|
||||
@@ -1272,7 +1272,7 @@ METHOD unTransform() CLASS GET
|
||||
lMinus := .T.
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF !lMinus
|
||||
IF ! lMinus
|
||||
FOR nFor := 1 TO ::nMaxLen
|
||||
IF ::IsEditable( nFor ) .AND. IsDigit( SubStr( cBuffer, nFor, 1 ) )
|
||||
EXIT
|
||||
@@ -1288,7 +1288,7 @@ METHOD unTransform() CLASS GET
|
||||
IF "D" $ ::cPicFunc .OR. ;
|
||||
"T" $ ::cPicFunc
|
||||
FOR nFor := ::FirstEditable() TO ::LastEditable()
|
||||
IF !::IsEditable( nFor )
|
||||
IF ! ::IsEditable( nFor )
|
||||
cBuffer := Left( cBuffer, nFor - 1 ) + Chr( 1 ) + SubStr( cBuffer, nFor + 1 )
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -1631,7 +1631,7 @@ METHOD deleteLow() CLASS GET
|
||||
IF ::lPicComplex
|
||||
/* Calculating different nMaxLen for ::lPicComplex */
|
||||
FOR n := ::nPos TO nMaxLen
|
||||
IF !::IsEditable( n )
|
||||
IF ! ::IsEditable( n )
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -271,7 +271,7 @@ METHOD Reader( oMenu, aMsg ) CLASS HBGetList
|
||||
::nLastExitState := 0
|
||||
oGet:setFocus()
|
||||
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
IF oGet:typeOut
|
||||
oGet:exitState := GE_ENTER
|
||||
ENDIF
|
||||
@@ -280,7 +280,7 @@ METHOD Reader( oMenu, aMsg ) CLASS HBGetList
|
||||
// oGet:exitState := GE_ENTER
|
||||
// ENDIF
|
||||
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
#ifdef HB_COMPAT_C53
|
||||
SetCursor( iif( ::nSaveCursor == SC_NONE, SC_NORMAL, ::nSaveCursor ) )
|
||||
nKey := Inkey( 0 )
|
||||
@@ -296,11 +296,11 @@ METHOD Reader( oMenu, aMsg ) CLASS HBGetList
|
||||
ENDDO
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
IF !::nLastExitState == GE_SHORTCUT .AND. ;
|
||||
!::nLastExitState == GE_MOUSEHIT .AND. ;
|
||||
!::GetPostValidate( oGet, aMsg )
|
||||
IF ! ::nLastExitState == GE_SHORTCUT .AND. ;
|
||||
! ::nLastExitState == GE_MOUSEHIT .AND. ;
|
||||
! ::GetPostValidate( oGet, aMsg )
|
||||
#else
|
||||
IF !::GetPostValidate( oGet, aMsg )
|
||||
IF ! ::GetPostValidate( oGet, aMsg )
|
||||
#endif
|
||||
oGet:exitState := GE_NOEXIT
|
||||
ENDIF
|
||||
@@ -888,7 +888,7 @@ METHOD GUIReader( oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
|
||||
::nHitCode := 0
|
||||
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
|
||||
// Check for initial typeout (no editable positions)
|
||||
IF oGUI:typeOut
|
||||
@@ -896,7 +896,7 @@ METHOD GUIReader( oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
ENDIF
|
||||
|
||||
// Apply keystrokes until exit
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
::GUIApplyKey( oGet, oGUI, Inkey( 0 ), oMenu, aMsg )
|
||||
|
||||
::ShowGetMsg( oGet, aMsg )
|
||||
@@ -904,7 +904,7 @@ METHOD GUIReader( oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
|
||||
IF ::nLastExitState != GE_SHORTCUT .AND. ;
|
||||
::nLastExitState != GE_MOUSEHIT .AND. ;
|
||||
!::GetPostValidate( oGet, aMsg )
|
||||
! ::GetPostValidate( oGet, aMsg )
|
||||
oGet:exitState := GE_NOEXIT
|
||||
ENDIF
|
||||
ENDDO
|
||||
@@ -1105,7 +1105,7 @@ METHOD GUIApplyKey( oGet, oGUI, nKey, oMenu, aMsg ) CLASS HBGetList
|
||||
oGUI:Select( nButton )
|
||||
|
||||
ELSEIF nButton == HTDROPBUTTON
|
||||
IF !oGUI:IsOpen
|
||||
IF ! oGUI:IsOpen
|
||||
oGUI:Open()
|
||||
lClose := .F.
|
||||
ENDIF
|
||||
@@ -1156,7 +1156,7 @@ METHOD GUIPreValidate( oGet, oGUI, aMsg ) CLASS HBGetList
|
||||
IF ::lKillRead
|
||||
lWhen := .F.
|
||||
oGet:exitState := GE_ESCAPE
|
||||
ELSEIF !lWhen
|
||||
ELSEIF ! lWhen
|
||||
oGet:exitState := GE_WHEN
|
||||
ELSE
|
||||
oGet:exitState := GE_NOEXIT
|
||||
@@ -1354,13 +1354,13 @@ METHOD TBReader( oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
|
||||
::nHitcode := 0
|
||||
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
|
||||
// Apply keystrokes until exit
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. !::lKillRead
|
||||
DO WHILE oGet:exitState == GE_NOEXIT .AND. ! ::lKillRead
|
||||
nKey := 0
|
||||
|
||||
DO WHILE !oTB:Stabilize() .AND. nKey == 0
|
||||
DO WHILE ! oTB:Stabilize() .AND. nKey == 0
|
||||
nKey := Inkey()
|
||||
ENDDO
|
||||
|
||||
@@ -1385,7 +1385,7 @@ METHOD TBReader( oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
// Disallow exit if the VALID condition is not satisfied
|
||||
IF ::nLastExitState == GE_SHORTCUT
|
||||
ELSEIF ::nLastExitState == GE_MOUSEHIT
|
||||
ELSEIF !::GetPostValidate( oGet, aMsg )
|
||||
ELSEIF ! ::GetPostValidate( oGet, aMsg )
|
||||
oGet:exitState := GE_NOEXIT
|
||||
ENDIF
|
||||
|
||||
@@ -1454,10 +1454,10 @@ METHOD Accelerator( nKey, aMsg ) CLASS HBGetList
|
||||
// Test the current GUI-GET or Get PostValidation:
|
||||
lGUI := HB_ISOBJECT( ::aGetList[ ::nPos ]:control )
|
||||
|
||||
IF lGUI .AND. !::GUIPostValidate( ::aGetList[ ::nPos ], ::aGetList[ ::nPos ]:control, aMsg )
|
||||
IF lGUI .AND. ! ::GUIPostValidate( ::aGetList[ ::nPos ], ::aGetList[ ::nPos ]:control, aMsg )
|
||||
RETURN 0
|
||||
|
||||
ELSEIF !lGUI .AND. !::GetPostValidate( ::aGetList[ ::nPos ], aMsg )
|
||||
ELSEIF ! lGUI .AND. ! ::GetPostValidate( ::aGetList[ ::nPos ], aMsg )
|
||||
RETURN 0
|
||||
|
||||
ENDIF
|
||||
@@ -1465,11 +1465,11 @@ METHOD Accelerator( nKey, aMsg ) CLASS HBGetList
|
||||
// Test the next GUI-GET or Get PreValidation:
|
||||
lGUI := HB_ISOBJECT( oGet:control )
|
||||
|
||||
IF lGUI .AND. !::GUIPreValidate( oGet, oGet:control, aMsg )
|
||||
IF lGUI .AND. ! ::GUIPreValidate( oGet, oGet:control, aMsg )
|
||||
// RETURN 0 // Commented out.
|
||||
RETURN nGet // Changed.
|
||||
|
||||
ELSEIF !lGUI .AND. !::GetPreValidate( oGet, aMsg )
|
||||
ELSEIF ! lGUI .AND. ! ::GetPreValidate( oGet, aMsg )
|
||||
// RETURN 0 // Commented out.
|
||||
RETURN nGet // Changed.
|
||||
|
||||
@@ -1507,13 +1507,13 @@ METHOD HitTest( nMRow, nMCol, aMsg ) CLASS HBGetList
|
||||
// Test the current GUI-GET or Get PostValidation:
|
||||
lGUI := HB_ISOBJECT( ::aGetList[ ::nPos ]:control )
|
||||
|
||||
IF lGUI .AND. !::GUIPostValidate( ::aGetList[ ::nPos ], ::aGetList[ ::nPos ]:control, aMsg )
|
||||
IF lGUI .AND. ! ::GUIPostValidate( ::aGetList[ ::nPos ], ::aGetList[ ::nPos ]:control, aMsg )
|
||||
|
||||
::nNextGet := 0
|
||||
// EXIT // Commented out.
|
||||
RETURN 0 // Changed.
|
||||
|
||||
ELSEIF !lGUI .AND. !::GetPostValidate( ::aGetList[ ::nPos ], aMsg )
|
||||
ELSEIF ! lGUI .AND. ! ::GetPostValidate( ::aGetList[ ::nPos ], aMsg )
|
||||
|
||||
::nNextGet := 0
|
||||
// EXIT // Commented out.
|
||||
@@ -1524,13 +1524,13 @@ METHOD HitTest( nMRow, nMCol, aMsg ) CLASS HBGetList
|
||||
// Test the next GUI-GET or Get PreValidation:
|
||||
lGUI := HB_ISOBJECT( ::aGetList[ ::nNextGet ]:control )
|
||||
|
||||
IF lGUI .AND. !::GUIPreValidate( ::aGetList[ ::nNextGet ], ::aGetList[ ::nNextGet ]:control, aMsg )
|
||||
IF lGUI .AND. ! ::GUIPreValidate( ::aGetList[ ::nNextGet ], ::aGetList[ ::nNextGet ]:control, aMsg )
|
||||
|
||||
::nNextGet := 0
|
||||
// EXIT // Commented out.
|
||||
RETURN ::nNextGet // Changed.
|
||||
|
||||
ELSEIF !lGUI .AND. !::GetPreValidate( ::aGetList[ ::nNextGet ], aMsg )
|
||||
ELSEIF ! lGUI .AND. ! ::GetPreValidate( ::aGetList[ ::nNextGet ], aMsg )
|
||||
|
||||
::nNextGet := 0
|
||||
// EXIT // Commented out.
|
||||
@@ -1623,13 +1623,13 @@ METHOD ShowGetMsg( oGet, aMsg ) CLASS HBGetList
|
||||
LOCAL cMsg
|
||||
LOCAL lMOldState
|
||||
|
||||
IF !Empty( aMsg ) .AND. aMsg[ MSGFLAG ]
|
||||
IF ! Empty( aMsg ) .AND. aMsg[ MSGFLAG ]
|
||||
|
||||
hb_default( @oGet, ::oGet )
|
||||
|
||||
cMsg := iif( HB_ISOBJECT( oGet:control ), oGet:control:message, oGet:message )
|
||||
|
||||
IF !Empty( cMsg )
|
||||
IF ! Empty( cMsg )
|
||||
lMOldState := MSetCursor( .F. )
|
||||
hb_DispOutAt( aMsg[ MSGROW ], aMsg[ MSGLEFT ], PadC( cMsg, aMsg[ MSGRIGHT ] - aMsg[ MSGLEFT ] + 1 ), aMsg[ MSGCOLOR ] )
|
||||
MSetCursor( lMOldState )
|
||||
@@ -1649,7 +1649,7 @@ METHOD EraseGetMsg( aMsg ) CLASS HBGetList
|
||||
LOCAL nCol := Col()
|
||||
LOCAL lMOldState
|
||||
|
||||
IF !Empty( aMsg ) .AND. aMsg[ MSGFLAG ]
|
||||
IF ! Empty( aMsg ) .AND. aMsg[ MSGFLAG ]
|
||||
lMOldState := MSetCursor( .F. )
|
||||
RestScreen( aMsg[ MSGROW ], aMsg[ MSGLEFT ], aMsg[ MSGROW ], aMsg[ MSGRIGHT ], ::cMsgSaveS )
|
||||
MSetCursor( lMOldState )
|
||||
|
||||
@@ -149,7 +149,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA
|
||||
|
||||
oTopMenu:select( nSelection )
|
||||
|
||||
IF !( oTopMenu:ClassName() == "TOPBARMENU" ) .AND. !oTopMenu:isOpen
|
||||
IF !( oTopMenu:ClassName() == "TOPBARMENU" ) .AND. ! oTopMenu:isOpen
|
||||
oTopMenu:open()
|
||||
ELSE
|
||||
oTopMenu:display()
|
||||
@@ -181,7 +181,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA
|
||||
|
||||
ENDIF
|
||||
|
||||
IF !oTopMenu:getItem( nSelection ):enabled
|
||||
IF ! oTopMenu:getItem( nSelection ):enabled
|
||||
RETURN 0
|
||||
ENDIF
|
||||
|
||||
@@ -207,7 +207,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA
|
||||
|
||||
IF lLeftDown
|
||||
|
||||
IF !::MHitTest( @oNewMenu, @nNewLevel, @nNewItem ) // ; hit nowhere.
|
||||
IF ! ::MHitTest( @oNewMenu, @nNewLevel, @nNewItem ) // ; hit nowhere.
|
||||
|
||||
ELSEIF nNewLevel != ::nMenuLevel // ; menu level change.
|
||||
|
||||
@@ -331,7 +331,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA
|
||||
|
||||
CASE nKey == K_LBUTTONDOWN
|
||||
|
||||
IF !::MHitTest( @oNewMenu, @nNewLevel, @nNewItem )
|
||||
IF ! ::MHitTest( @oNewMenu, @nNewLevel, @nNewItem )
|
||||
|
||||
IF GetList != NIL .AND. HitTest( GetList, MRow(), MCol(), ::GetMsgArray() ) != 0
|
||||
GetActive():ExitState := GE_MOUSEHIT
|
||||
@@ -395,7 +395,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA
|
||||
::oMenu:select( nNewItem )
|
||||
::oMenu:display()
|
||||
|
||||
IF !::PushMenu()
|
||||
IF ! ::PushMenu()
|
||||
::ShowMsg( .F. )
|
||||
nReturn := ::execute()
|
||||
IF nReturn != 0
|
||||
@@ -472,7 +472,7 @@ METHOD PushMenu() CLASS HBMenuSys
|
||||
::aMenuList[ ++::nMenuLevel ] := ::oMenu
|
||||
::oMenu:select( ::oMenu:getFirst() )
|
||||
|
||||
IF !::oMenu:isOpen
|
||||
IF ! ::oMenu:isOpen
|
||||
::oMenu:open()
|
||||
ENDIF
|
||||
|
||||
@@ -547,7 +547,7 @@ METHOD Execute() CLASS HBMenuSys
|
||||
LOCAL lPas := .T.
|
||||
|
||||
// Execute the Data block if selected MenuItem is !IsPopUp:
|
||||
IF HB_ISOBJECT( oNewMenu ) .AND. !oNewMenu:IsPopUp
|
||||
IF HB_ISOBJECT( oNewMenu ) .AND. ! oNewMenu:IsPopUp
|
||||
|
||||
IF ::oMenu:ClassName() $ "TOPBARMENU|POPUPMENU|HB_POPUPMENU"
|
||||
SetPos( ::nOldRow, ::nOldCol )
|
||||
@@ -563,7 +563,7 @@ METHOD Execute() CLASS HBMenuSys
|
||||
// Display newly selected current menu item:
|
||||
IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" .AND. ;
|
||||
::nMenuLevel == 1 .AND. ;
|
||||
!::oMenu:isOpen
|
||||
! ::oMenu:isOpen
|
||||
|
||||
::oMenu:open()
|
||||
ENDIF
|
||||
@@ -630,7 +630,7 @@ METHOD ShowMsg( lMode ) CLASS HBMenuSys
|
||||
|
||||
IF ::lMsgFlag .AND. ;
|
||||
( nCurrent := ::oMenu:current ) != 0 .AND. ;
|
||||
!Empty( cMsg := ::oMenu:getItem( nCurrent ):message )
|
||||
! Empty( cMsg := ::oMenu:getItem( nCurrent ):message )
|
||||
|
||||
hb_DispOutAt( ::nMsgRow, ::nMsgLeft, PadC( cMsg, ::nMsgRight - ::nMsgLeft + 1 ), ::cMsgColor )
|
||||
ENDIF
|
||||
|
||||
@@ -92,7 +92,7 @@ METHOD setCoors( nRow, nCol, lTop ) CLASS hb_POPUPMENU
|
||||
nDif := ::nRight - MaxCol()
|
||||
::nRight -= nDif
|
||||
::nLeft -= nDif
|
||||
IF !lTop
|
||||
IF ! lTop
|
||||
::nTop++
|
||||
::nBottom++
|
||||
ENDIF
|
||||
@@ -156,7 +156,7 @@ METHOD isShortCut( nKey, nID ) CLASS hb_POPUPMENU
|
||||
// Loop to wrap around through TopMenu from Current Item:
|
||||
FOR i := 1 TO nTotal
|
||||
IF !( oItem := ::getItem( nItem ) ):enabled
|
||||
ELSEIF !oItem:isPopUp()
|
||||
ELSEIF ! oItem:isPopUp()
|
||||
ELSEIF oItem:data:isQuick( nKey, @nID )
|
||||
RETURN .T.
|
||||
ENDIF
|
||||
|
||||
@@ -103,7 +103,7 @@ STATIC FUNCTION s_valToExp( xVal, cInd, hRefs, cRefs )
|
||||
cInd := cRefs := ""
|
||||
hRefs := { tmp => cInd }
|
||||
ELSEIF tmp $ hRefs
|
||||
IF !cRefs == ""
|
||||
IF !( cRefs == "" )
|
||||
cRefs += ","
|
||||
ENDIF
|
||||
cRefs += "{{" + cInd + "}," + hRefs[ tmp ] + "}"
|
||||
@@ -135,7 +135,7 @@ STATIC FUNCTION s_valToExp( xVal, cInd, hRefs, cRefs )
|
||||
cVal += "}"
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cRefs ) .AND. cInd == ""
|
||||
IF ! Empty( cRefs ) .AND. cInd == ""
|
||||
cVal := "__itemSetRef( " + cVal + ", {" + cRefs + "} )"
|
||||
ENDIF
|
||||
IF v == "O"
|
||||
|
||||
@@ -1482,7 +1482,7 @@ FUNCTION CallStack()
|
||||
LOCAL tmp := 1
|
||||
LOCAL cString := ""
|
||||
|
||||
DO WHILE !Empty( ProcName( tmp ) )
|
||||
DO WHILE ! Empty( ProcName( tmp ) )
|
||||
cString += ProcName( tmp ) + " (" + hb_ntos( ProcLine( tmp ) ) + ") "
|
||||
tmp++
|
||||
ENDDO
|
||||
@@ -1506,7 +1506,7 @@ PROCEDURE LogMe( nPCount, data, desc )
|
||||
ENDIF
|
||||
desc := s_cTest + " " + desc
|
||||
|
||||
IF !s_lCallBackStack
|
||||
IF ! s_lCallBackStack
|
||||
cStack := ""
|
||||
ENDIF
|
||||
|
||||
@@ -1724,10 +1724,10 @@ STATIC FUNCTION ErrorMessage( oError )
|
||||
IF ValType( oError:description ) == "C"
|
||||
cMessage += oError:description + " "
|
||||
ENDIF
|
||||
IF !Empty( oError:operation )
|
||||
IF ! Empty( oError:operation )
|
||||
cMessage += oError:operation + " "
|
||||
ENDIF
|
||||
IF !Empty( oError:filename )
|
||||
IF ! Empty( oError:filename )
|
||||
cMessage += oError:filename + " "
|
||||
ENDIF
|
||||
|
||||
@@ -1758,7 +1758,7 @@ STATIC FUNCTION ErrorMessage( oError )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF !Empty( oError:cargo )
|
||||
IF ! Empty( oError:cargo )
|
||||
cMessage += " " + oError:cargo
|
||||
ENDIF
|
||||
ELSE
|
||||
@@ -1780,7 +1780,7 @@ FUNCTION hb_SToD( cDate )
|
||||
LOCAL cOldDateFormat
|
||||
LOCAL dDate
|
||||
|
||||
IF ValType( cDate ) == "C" .AND. !Empty( cDate )
|
||||
IF ValType( cDate ) == "C" .AND. ! Empty( cDate )
|
||||
cOldDateFormat := Set( _SET_DATEFORMAT, "yyyy/mm/dd" )
|
||||
|
||||
dDate := CToD( SubStr( cDate, 1, 4 ) + "/" +;
|
||||
|
||||
@@ -425,7 +425,7 @@ PROCEDURE LogMe( data, desc )
|
||||
ENDIF
|
||||
desc := s_cTest + " " + desc
|
||||
|
||||
IF !s_lCallBackStack
|
||||
IF ! s_lCallBackStack
|
||||
cStack := ""
|
||||
ENDIF
|
||||
|
||||
@@ -736,11 +736,11 @@ STATIC FUNCTION ErrorMessage( oError )
|
||||
IF ValType( oError:description ) == "C"
|
||||
cMessage += oError:description + " "
|
||||
ENDIF
|
||||
IF !Empty( oError:operation ) .AND. !s_lIgnoreErrOp
|
||||
IF ! Empty( oError:operation ) .AND. ! s_lIgnoreErrOp
|
||||
/* NOTE: Clipping this to hide the difference in maximum symbol name length in error messages. [vszakats] */
|
||||
cMessage += Left( oError:operation, 9 ) + " "
|
||||
ENDIF
|
||||
IF !Empty( oError:filename )
|
||||
IF ! Empty( oError:filename )
|
||||
cMessage += oError:filename + " "
|
||||
ENDIF
|
||||
|
||||
@@ -794,7 +794,7 @@ FUNCTION hb_SToD( cDate )
|
||||
LOCAL cOldDateFormat
|
||||
LOCAL dDate
|
||||
|
||||
IF ValType( cDate ) == "C" .AND. !Empty( cDate )
|
||||
IF ValType( cDate ) == "C" .AND. ! Empty( cDate )
|
||||
cOldDateFormat := Set( _SET_DATEFORMAT, "yyyy/mm/dd" )
|
||||
|
||||
dDate := CToD( SubStr( cDate, 1, 4 ) + "/" +;
|
||||
@@ -824,10 +824,10 @@ FUNCTION __eInstVar53( oVar, cMethod, xValue, cType, nSubCode, bValid )
|
||||
|
||||
LOCAL oError
|
||||
|
||||
IF !( VALTYPE( xValue ) == cType ) .OR. ;
|
||||
( bValid != NIL .AND. !EVAL( bValid, oVar, xValue ) )
|
||||
IF !( ValType( xValue ) == cType ) .OR. ;
|
||||
( bValid != NIL .AND. ! Eval( bValid, oVar, xValue ) )
|
||||
oError := ErrorNew()
|
||||
oError:description := HB_LANGERRMSG( 1 )
|
||||
oError:description := hb_langErrMsg( 1 )
|
||||
oError:gencode := 1
|
||||
oError:severity := 2
|
||||
oError:cansubstitute := .T.
|
||||
@@ -835,8 +835,8 @@ FUNCTION __eInstVar53( oVar, cMethod, xValue, cType, nSubCode, bValid )
|
||||
HB_SYMBOL_UNUSED( cMethod )
|
||||
oError:subcode := nSubCode
|
||||
oError:args := { xValue }
|
||||
xValue := EVAL( ERRORBLOCK(), oError )
|
||||
IF !( VALTYPE( xValue ) == cType )
|
||||
xValue := Eval( ErrorBlock(), oError )
|
||||
IF !( ValType( xValue ) == cType )
|
||||
__errInHandler()
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -23,7 +23,7 @@ FUNCTION transtest( xVal, cPict, cExpect )
|
||||
|
||||
LOCAL cResult := Transform( xVal, cPict )
|
||||
|
||||
IF !cResult == cExpect
|
||||
IF ! cResult == cExpect
|
||||
s_stop := .T.
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -558,10 +558,10 @@ STATIC FUNCTION ErrorMessage( oError )
|
||||
IF ValType( oError:description ) == "C"
|
||||
cMessage += oError:description + " "
|
||||
ENDIF
|
||||
IF !Empty( oError:operation )
|
||||
IF ! Empty( oError:operation )
|
||||
cMessage += "(" + oError:operation + ") "
|
||||
ENDIF
|
||||
IF !Empty( oError:filename )
|
||||
IF ! Empty( oError:filename )
|
||||
cMessage += "<" + oError:filename + "> "
|
||||
ENDIF
|
||||
IF ValType( oError:osCode ) == "N"
|
||||
@@ -604,7 +604,7 @@ STATIC FUNCTION ListToNArray( cString )
|
||||
LOCAL aArray := {}
|
||||
LOCAL nPos
|
||||
|
||||
IF !Empty( cString )
|
||||
IF ! Empty( cString )
|
||||
DO WHILE ( nPos := At( ",", cString ) ) > 0
|
||||
AAdd( aArray, Val( AllTrim( Left( cString, nPos - 1 ) ) ) )
|
||||
cString := SubStr( cString, nPos + 1 )
|
||||
|
||||
@@ -1095,7 +1095,7 @@ PROCEDURE Main_OPOVERL()
|
||||
TEST_LINE( oString % "TST" , "Hello % TST" )
|
||||
TEST_LINE( oString ^ "TST" , "Hello ^ TST" )
|
||||
TEST_LINE( oString ** "TST" , "Hello ^ TST" )
|
||||
IF !TEST_OPT_Z()
|
||||
IF ! TEST_OPT_Z()
|
||||
TEST_LINE( oString .AND. "TST" , "Hello AND TST" )
|
||||
TEST_LINE( oString .OR. "TST" , "Hello OR TST" )
|
||||
ENDIF
|
||||
|
||||
@@ -338,15 +338,15 @@ body { color: #000000; background-color: #FFFFFF; }
|
||||
</SPAN><SPAN class=any1-space> </SPAN><SPAN class=any1-comment>/*
|
||||
cRes := ""
|
||||
FOR i := 1 TO len( ::cContent )
|
||||
IF substr( ::cContent, i, 1 ) == "<" .AND. ;
|
||||
substr( ::cContent, i + 1, 1 ) == "#"
|
||||
IF SubStr( ::cContent, i, 1 ) == "<" .AND. ;
|
||||
SubStr( ::cContent, i + 1, 1 ) == "#"
|
||||
lFlag := .t.
|
||||
ELSEIF substr( ::cContent, i, 1 ) == ">" .AND. lFlag
|
||||
ELSEIF SubStr( ::cContent, i, 1 ) == ">" .AND. lFlag
|
||||
lFlag := .f.
|
||||
ELSEIF !lFlag
|
||||
cRes += substr( ::cContent, i, 1 )
|
||||
ELSEIF ! lFlag
|
||||
cRes += SubStr( ::cContent, i, 1 )
|
||||
ENDIF
|
||||
NEXT i
|
||||
NEXT
|
||||
|
||||
::cContent := cRes
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user