2008-06-19 18:26 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/examples/guestbk/guestbk.prg
* contrib/examples/guestbk/inifiles.prg
* contrib/examples/guestbk/testcgi.prg
* contrib/examples/hscript/hscript.prg
* contrib/examples/pe/editorhi.prg
* contrib/gtwvg/tests/demowvg.prg
* contrib/hbbtree/tests/test.prg
* contrib/hbbtree/tests/ttest.prg
* contrib/hbclipsm/tests/testgaug.prg
* contrib/hbct/getinfo.prg
* contrib/hbct/getinput.prg
* contrib/hbct/getsecrt.prg
* contrib/hbct/keytime.prg
* contrib/hbct/numconv.prg
* contrib/hbfbird/tfirebird.prg
* contrib/hbgd/gd.prg
* contrib/hbgd/gdbar.prg
* contrib/hbgd/gdbarcod.prg
* contrib/hbgd/gdimage.prg
* contrib/hbgd/tests/animgif.prg
* contrib/hbgd/tests/gdtest.prg
* contrib/hbgd/tests/test_out.prg
* contrib/hbgf/gtk/button.prg
* contrib/hbgf/gtk/form.prg
* contrib/hbgf/gtk/menuitem.prg
* contrib/hbgf/gtk/winctrl.prg
* contrib/hbgf/os2pm/button.prg
* contrib/hbgf/os2pm/edit.prg
* contrib/hbgf/os2pm/tform.prg
* contrib/hbgf/os2pm/tmenu.prg
* contrib/hbgf/os2pm/tmenuitm.prg
* contrib/hbgf/tests/formtext.prg
* contrib/hbgf/tests/testctrl.prg
* contrib/hbgf/tests/testform.prg
* contrib/hbgf/win32/button.prg
* contrib/hbgf/win32/edit.prg
* contrib/hbgf/win32/form.prg
* contrib/hbgf/win32/menu.prg
* contrib/hbgf/win32/menuitem.prg
* contrib/hbhpdf/tests/harupdf.prg
* contrib/hbmsql/tests/dbf2msql.prg
* contrib/hbmsql/tmsql.prg
* contrib/hbmysql/dbf2mysql.prg
* contrib/hbmysql/tmysql.prg
* contrib/hbmysql/tsqlbrw.prg
* contrib/hbmzip/tests/myzip.prg
* contrib/hbnf/aredit.prg
* contrib/hbnf/calendar.prg
* contrib/hbnf/clrsel.prg
* contrib/hbnf/pending.prg
* contrib/hbnf/sqzn.prg
* contrib/hbnf/tbwhile.prg
* contrib/hbnf/tests/test.prg
* contrib/hbodbc/todbc.prg
* contrib/hbpgsql/tests/dbf2pg.prg
* contrib/hbpgsql/tpostgre.prg
* contrib/hbsqlit2/tests/hbsqlite.prg
* contrib/hbsqlit3/tests/sqlite3_test.prg
* contrib/hbtpathy/telepath.prg
* contrib/hbvpdf/hbvpdf.prg
* contrib/hbvpdf/hbvpdft.prg
* contrib/hbvpdf/tests/pdf_demo.prg
* contrib/hbvpdf/tests/tstpdf.prg
* contrib/hbw32/w32_tole.prg
* contrib/hbw32/w32_tprn.prg
* contrib/hbw32ddr/tests/testdx.prg
* contrib/rddado/adordd.prg
* contrib/rddado/tests/access2.prg
* source/debug/debugger.prg
* source/rdd/hbsix/sxini.prg
* utils/hbdot/hbdot.prg
* utils/hbextern/hbextern.prg
* Cleanup.
<> -> != or !( == ) for strings
if() -> iif() (for inline, where noticed)
' = ' -> := or == for comparisons, or left as '=' in the few
rare cases where this was (probably) intended (sxini.prg).
Excluded: most tests, hbnf, util/hbdoc, util/hbmake, hbwhat32, gtwvg,
hbvpdf has some difficult to judge '=' operators, so I left them.
! Fixed some _SET_EXACT dependencies in a few places.
; TODO: If possible, add a compile switch to catch these, as
it's not very easy using 'grep'.
This commit is contained in:
@@ -8,6 +8,90 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-19 18:26 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/examples/guestbk/guestbk.prg
|
||||
* contrib/examples/guestbk/inifiles.prg
|
||||
* contrib/examples/guestbk/testcgi.prg
|
||||
* contrib/examples/hscript/hscript.prg
|
||||
* contrib/examples/pe/editorhi.prg
|
||||
* contrib/gtwvg/tests/demowvg.prg
|
||||
* contrib/hbbtree/tests/test.prg
|
||||
* contrib/hbbtree/tests/ttest.prg
|
||||
* contrib/hbclipsm/tests/testgaug.prg
|
||||
* contrib/hbct/getinfo.prg
|
||||
* contrib/hbct/getinput.prg
|
||||
* contrib/hbct/getsecrt.prg
|
||||
* contrib/hbct/keytime.prg
|
||||
* contrib/hbct/numconv.prg
|
||||
* contrib/hbfbird/tfirebird.prg
|
||||
* contrib/hbgd/gd.prg
|
||||
* contrib/hbgd/gdbar.prg
|
||||
* contrib/hbgd/gdbarcod.prg
|
||||
* contrib/hbgd/gdimage.prg
|
||||
* contrib/hbgd/tests/animgif.prg
|
||||
* contrib/hbgd/tests/gdtest.prg
|
||||
* contrib/hbgd/tests/test_out.prg
|
||||
* contrib/hbgf/gtk/button.prg
|
||||
* contrib/hbgf/gtk/form.prg
|
||||
* contrib/hbgf/gtk/menuitem.prg
|
||||
* contrib/hbgf/gtk/winctrl.prg
|
||||
* contrib/hbgf/os2pm/button.prg
|
||||
* contrib/hbgf/os2pm/edit.prg
|
||||
* contrib/hbgf/os2pm/tform.prg
|
||||
* contrib/hbgf/os2pm/tmenu.prg
|
||||
* contrib/hbgf/os2pm/tmenuitm.prg
|
||||
* contrib/hbgf/tests/formtext.prg
|
||||
* contrib/hbgf/tests/testctrl.prg
|
||||
* contrib/hbgf/tests/testform.prg
|
||||
* contrib/hbgf/win32/button.prg
|
||||
* contrib/hbgf/win32/edit.prg
|
||||
* contrib/hbgf/win32/form.prg
|
||||
* contrib/hbgf/win32/menu.prg
|
||||
* contrib/hbgf/win32/menuitem.prg
|
||||
* contrib/hbhpdf/tests/harupdf.prg
|
||||
* contrib/hbmsql/tests/dbf2msql.prg
|
||||
* contrib/hbmsql/tmsql.prg
|
||||
* contrib/hbmysql/dbf2mysql.prg
|
||||
* contrib/hbmysql/tmysql.prg
|
||||
* contrib/hbmysql/tsqlbrw.prg
|
||||
* contrib/hbmzip/tests/myzip.prg
|
||||
* contrib/hbnf/aredit.prg
|
||||
* contrib/hbnf/calendar.prg
|
||||
* contrib/hbnf/clrsel.prg
|
||||
* contrib/hbnf/pending.prg
|
||||
* contrib/hbnf/sqzn.prg
|
||||
* contrib/hbnf/tbwhile.prg
|
||||
* contrib/hbnf/tests/test.prg
|
||||
* contrib/hbodbc/todbc.prg
|
||||
* contrib/hbpgsql/tests/dbf2pg.prg
|
||||
* contrib/hbpgsql/tpostgre.prg
|
||||
* contrib/hbsqlit2/tests/hbsqlite.prg
|
||||
* contrib/hbsqlit3/tests/sqlite3_test.prg
|
||||
* contrib/hbtpathy/telepath.prg
|
||||
* contrib/hbvpdf/hbvpdf.prg
|
||||
* contrib/hbvpdf/hbvpdft.prg
|
||||
* contrib/hbvpdf/tests/pdf_demo.prg
|
||||
* contrib/hbvpdf/tests/tstpdf.prg
|
||||
* contrib/hbw32/w32_tole.prg
|
||||
* contrib/hbw32/w32_tprn.prg
|
||||
* contrib/hbw32ddr/tests/testdx.prg
|
||||
* contrib/rddado/adordd.prg
|
||||
* contrib/rddado/tests/access2.prg
|
||||
* source/debug/debugger.prg
|
||||
* source/rdd/hbsix/sxini.prg
|
||||
* utils/hbdot/hbdot.prg
|
||||
* utils/hbextern/hbextern.prg
|
||||
* Cleanup.
|
||||
<> -> != or !( == ) for strings
|
||||
if() -> iif() (for inline, where noticed)
|
||||
' = ' -> := or == for comparisons, or left as '=' in the few
|
||||
rare cases where this was (probably) intended (sxini.prg).
|
||||
Excluded: most tests, hbnf, util/hbdoc, util/hbmake, hbwhat32, gtwvg,
|
||||
hbvpdf has some difficult to judge '=' operators, so I left them.
|
||||
! Fixed some _SET_EXACT dependencies in a few places.
|
||||
; TODO: If possible, add a compile switch to catch these, as
|
||||
it's not very easy using 'grep'.
|
||||
|
||||
2008-06-19 11:23 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* source/rtl/gtwvt/gtwvt.c
|
||||
! Avoid using the "Windows" word in public message.
|
||||
|
||||
@@ -62,7 +62,7 @@ FUNCTION Main()
|
||||
|
||||
oHTML:ProcessCGI()
|
||||
|
||||
IF oHTML:QueryFields( "Oper" ) = "A" // Add Entry
|
||||
IF oHTML:QueryFields( "Oper" ) == "A" // Add Entry
|
||||
|
||||
nEntry := oIni:ReadNumber( "Entries", "Entries", 0 ) + 1
|
||||
oIni:WriteNumber( "Entries", "Entries", nEntry )
|
||||
|
||||
@@ -260,7 +260,7 @@ static function ReadSection(cSection)
|
||||
|
||||
for j := 1 to Len(::Contents[i][2])
|
||||
|
||||
if ::Contents[i][2][j][1] <> NIL
|
||||
if ::Contents[i][2][j][1] != NIL
|
||||
AAdd(aSection, ::Contents[i][2][j][1])
|
||||
endif
|
||||
next
|
||||
|
||||
@@ -78,9 +78,9 @@ FUNCTION Hex2Dec( cHex )
|
||||
LOCAL nRet
|
||||
LOCAL nRes
|
||||
|
||||
nRet := ascan( aHex, { |x| upper( x[1] ) = upper( left( cHex, 1 ) ) } )
|
||||
nRet := ascan( aHex, { |x| upper( x[1] ) == upper( left( cHex, 1 ) ) } )
|
||||
nRes := aHex[nRet, 2] * 16
|
||||
nRet := ascan( aHex, { |x| upper( x[1] ) = upper( right( cHex, 1 ) ) } )
|
||||
nRet := ascan( aHex, { |x| upper( x[1] ) == upper( right( cHex, 1 ) ) } )
|
||||
nRes += aHex[nRet, 2]
|
||||
|
||||
RETURN( nRes )
|
||||
@@ -92,7 +92,7 @@ FUNCTION THTML
|
||||
STATIC oClass
|
||||
|
||||
IF oClass == NIL
|
||||
oClass = HBClass():New( "THTML" )
|
||||
oClass := HBClass():New( "THTML" )
|
||||
|
||||
oClass:AddData( "cTitle" ) // Page Title
|
||||
oClass:AddData( "cBody" ) // HTML Body Handler
|
||||
@@ -322,12 +322,12 @@ STATIC FUNCTION ProcessCGI()
|
||||
len( cBuff ) - at( "=", cBuff ) + 1 ), "+", " " ) } )
|
||||
cBuff := ""
|
||||
ELSE
|
||||
IF substr( cQuery, i, 1 ) = "%"
|
||||
IF substr( cQuery, i, 1 ) == "%"
|
||||
cBuff += chr( Hex2Dec( substr( cQuery, i + 1, 2 ) ) )
|
||||
nBuff := 3
|
||||
ENDIF
|
||||
|
||||
IF nBuff = 0
|
||||
IF nBuff == 0
|
||||
cBuff += substr( cQuery, i, 1 )
|
||||
ELSE
|
||||
nBuff--
|
||||
@@ -364,7 +364,7 @@ STATIC FUNCTION QueryFields( cQueryName )
|
||||
::ProcessCGI()
|
||||
|
||||
nRet := aScan( ::aQueryFields, ;
|
||||
{ |x| upper( x[1] ) = upper( cQueryName ) } )
|
||||
{ |x| upper( x[1] ) == upper( cQueryName ) } )
|
||||
|
||||
IF nRet > 0
|
||||
cRet := ::aQueryFields[nRet, 2]
|
||||
|
||||
@@ -127,7 +127,7 @@ FUNCTION Main( cScript )
|
||||
|
||||
c := SubStr( cLine, i, 1 )
|
||||
|
||||
IF c = "%" .AND. substr( cLine, i + 1, 1 ) = ">"
|
||||
IF c == "%" .AND. substr( cLine, i + 1, 1 ) == ">"
|
||||
IF lOpen
|
||||
// Error - Already in htm mode
|
||||
ELSE
|
||||
@@ -144,7 +144,7 @@ FUNCTION Main( cScript )
|
||||
ENDIF
|
||||
i++
|
||||
|
||||
ELSEIF c = "<" .AND. substr( cLine, i + 1, 1 ) = "%"
|
||||
ELSEIF c == "<" .AND. substr( cLine, i + 1, 1 ) == "%"
|
||||
IF !lOpen
|
||||
// Error - Not in htm mode
|
||||
ELSE
|
||||
@@ -164,7 +164,7 @@ FUNCTION Main( cScript )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
IF lOpen .AND. substr( cLine, nLen - 1, 2 ) <> "%>"
|
||||
IF lOpen .AND. !( substr( cLine, nLen - 1, 2 ) == "%>" )
|
||||
cTrans += "' + chr(10) )"
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -73,22 +73,22 @@ EXPORT FUNCTION EditorNew( nTop, nLeft, nBottom, nRight, nLength, ;
|
||||
LOCAL nEdit, oEdit
|
||||
|
||||
IF( nLength == NIL )
|
||||
nLength =80
|
||||
nLength := 80
|
||||
ENDIF
|
||||
nEdit =ED_New( nLength, 4, IIFNIL(nESize, nSize), nEscape )
|
||||
nEdit := ED_New( nLength, 4, IIFNIL(nESize, nSize), nEscape )
|
||||
IF( nEdit >= 0 )
|
||||
oEdit :=ARRAY( E_STRUCT_LEN )
|
||||
oEdit[E_EDIT] =nEdit
|
||||
oEdit[E_EDIT] := nEdit
|
||||
|
||||
oEdit[E_TOP] =nTop
|
||||
oEdit[E_LEFT] =nLeft
|
||||
oEdit[E_BOTTOM] =nBottom
|
||||
oEdit[E_RIGHT] =nRight
|
||||
oEdit[E_LINELEN] =nLength
|
||||
oEdit[E_FRAME] =IIFNIL( B_DOUBLE, cFrame )
|
||||
oEdit[E_TITLE] =cTitle
|
||||
oEdit[E_COLOR] =IIFNIL( "W/N,W+/N,W+/R,GR+/N,G+/N", cColor )
|
||||
oEdit[E_MODE] =EDIT_VIEW
|
||||
oEdit[E_TOP] := nTop
|
||||
oEdit[E_LEFT] := nLeft
|
||||
oEdit[E_BOTTOM] := nBottom
|
||||
oEdit[E_RIGHT] := nRight
|
||||
oEdit[E_LINELEN] := nLength
|
||||
oEdit[E_FRAME] := IIFNIL( B_DOUBLE, cFrame )
|
||||
oEdit[E_TITLE] := cTitle
|
||||
oEdit[E_COLOR] := IIFNIL( "W/N,W+/N,W+/R,GR+/N,G+/N", cColor )
|
||||
oEdit[E_MODE] := EDIT_VIEW
|
||||
|
||||
ED_Config( nEdit, nTop, nLeft, nBottom, nRight, 0, 0 )
|
||||
ENDIF
|
||||
@@ -121,7 +121,7 @@ EXPORT FUNCTION EditorCargo( oEdit, xCargo )
|
||||
LOCAL _xCargo:=oEdit[E_CARGO]
|
||||
|
||||
IFANY( xCargo )
|
||||
oEdit[E_CARGO] =xCargo
|
||||
oEdit[E_CARGO] := xCargo
|
||||
ENDIF
|
||||
|
||||
RETURN( _xCargo )
|
||||
@@ -133,7 +133,7 @@ EXPORT FUNCTION EditorTitle( oEdit, cTitle )
|
||||
LOCAL _cTitle:=oEdit[E_TITLE]
|
||||
|
||||
IFANY( cTitle )
|
||||
oEdit[E_TITLE] =cTitle
|
||||
oEdit[E_TITLE] := cTitle
|
||||
ENDIF
|
||||
|
||||
RETURN( _cTitle )
|
||||
@@ -149,7 +149,7 @@ EXPORT FUNCTION EditorMode( oEdit, lMode )
|
||||
LOCAL _lMode:=oEdit[E_MODE]
|
||||
|
||||
IFANY( lMode )
|
||||
oEdit[E_MODE] =lMode
|
||||
oEdit[E_MODE] := lMode
|
||||
ENDIF
|
||||
|
||||
RETURN( _lMode )
|
||||
@@ -161,7 +161,7 @@ EXPORT FUNCTION EditorSize( nSize )
|
||||
LOCAL _nSize:=nESize
|
||||
|
||||
IF nSize != NIL
|
||||
nESize =nSize
|
||||
nESize := nSize
|
||||
ENDIF
|
||||
|
||||
RETURN( _nSize )
|
||||
@@ -212,10 +212,10 @@ RETURN
|
||||
EXPORT FUNCTION EditorGetText( oEdit, nUpper, nCarret )
|
||||
|
||||
IFNIL( nUpper )
|
||||
nUpper =EDIT_SAME
|
||||
nUpper := EDIT_SAME
|
||||
ENDIF
|
||||
IFNIL( nCarret )
|
||||
nCarret =EDIT_HARD
|
||||
nCarret := EDIT_HARD
|
||||
ENDIF
|
||||
|
||||
RETURN( ED_GetText( oEdit[E_EDIT], nUpper, nCarret ) )
|
||||
@@ -274,23 +274,23 @@ LOCAL nHandle, nLen, oEdit, bF2, bF8, oHelp, lSaved:=.F., lClose:=.F.
|
||||
LOCAL nSize
|
||||
|
||||
IF( lSave == NIL )
|
||||
lSave =.T.
|
||||
lSave := .T.
|
||||
ENDIF
|
||||
IF( VALTYPE(xInput) == 'C' )
|
||||
nHandle =FOPEN( xInput )
|
||||
lClose =.T.
|
||||
IF( VALTYPE(xInput) == "C" )
|
||||
nHandle := FOPEN( xInput )
|
||||
lClose := .T.
|
||||
ELSE
|
||||
nHandle =xInput
|
||||
nHandle := xInput
|
||||
ENDIF
|
||||
|
||||
IF( nHandle > 0 )
|
||||
nLen =MAX( FileLength( nHandle ), nESize )
|
||||
nLen := MAX( FileLength( nHandle ), nESize )
|
||||
ELSE
|
||||
nLen =nESize
|
||||
nLen := nESize
|
||||
ENDIF
|
||||
|
||||
nSize =IIF( nLen < 8192, nLen*2, INT(nLen*1.5) )
|
||||
oEdit =EditorNew( 01,00,23,79, nLineLen, '--- ', cOutput, , ;
|
||||
nSize := IIF( nLen < 8192, nLen*2, INT(nLen*1.5) )
|
||||
oEdit := EditorNew( 01,00,23,79, nLineLen, "--- ", cOutput, , ;
|
||||
nSize, nEscape )
|
||||
|
||||
IF( nHandle > 0 )
|
||||
@@ -300,7 +300,7 @@ LOCAL nSize
|
||||
FCLOSE( nHandle )
|
||||
ENDIF
|
||||
ELSE
|
||||
EditorSetText( oEdit, ' ' )
|
||||
EditorSetText( oEdit, " " )
|
||||
ENDIF
|
||||
|
||||
EditorCargo( oEdit, cOutput )
|
||||
@@ -308,11 +308,11 @@ LOCAL nSize
|
||||
// SAVELINE 24 TO oHelp WITH 80, ColorHelp( ,COLOR_EXTEND )
|
||||
// IF( lSave )
|
||||
// DisplayHelp( 73 ) //F2-save
|
||||
// bF2 =SETKEY( K_F2, {|oE| lSaved:=EditorSave(oE)} )
|
||||
// bF2 := SETKEY( K_F2, {|oE| lSaved:=EditorSave(oE)} )
|
||||
// ENDIF
|
||||
// IF( lPrint != NIL .AND. lPrint )
|
||||
// DisplayHelp( 74 ) //F8-print
|
||||
// bF8 =SETKEY( K_F8, {|oE| EditorPrint(oE)} )
|
||||
// bF8 := SETKEY( K_F8, {|oE| EditorPrint(oE)} )
|
||||
// ENDIF
|
||||
|
||||
lSaved :=EditorEdit( oEdit, EDIT_EDIT, .F., nHelp )
|
||||
@@ -365,31 +365,31 @@ LOCAL nTop, nLeft, nBottom, nRight
|
||||
LOCAL lSaveAllowed, lSaved:=.F.
|
||||
//HELPSAVE( IIF(nHelp==NIL, H_EDITOR, nHelp ) )
|
||||
|
||||
oBox =SAVEBOX( oEdit[E_TOP], oEdit[E_LEFT], ;
|
||||
oBox := SAVEBOX( oEdit[E_TOP], oEdit[E_LEFT], ;
|
||||
oEdit[E_BOTTOM], oEdit[E_RIGHT], ;
|
||||
oEdit[E_COLOR], oEdit[E_FRAME], oEdit[E_TITLE], .F. )
|
||||
|
||||
lInsert =SET( _SET_INSERT )
|
||||
lInsert := SET( _SET_INSERT )
|
||||
// SayInsert()
|
||||
nCursor =SetCursor( IIF(lInsert, SC_NORMAL, SC_SPECIAL1) )
|
||||
nCursor := SetCursor( IIF(lInsert, SC_NORMAL, SC_SPECIAL1) )
|
||||
IFANY( lEdit )
|
||||
oEdit[E_MODE] =lEdit
|
||||
oEdit[E_MODE] := lEdit
|
||||
ENDIF
|
||||
lSaveAllowed :=( SETKEY(K_F2) == NIL )
|
||||
// IF( lSaveAllowed )
|
||||
// DisplayHelp( 73 ) //F2-save
|
||||
// ENDIF
|
||||
|
||||
nTop =oEdit[E_TOP] +1
|
||||
nLeft =oEdit[E_LEFT] +1
|
||||
nBottom =oEdit[E_BOTTOM] -1
|
||||
nRight =oEdit[E_RIGHT] -1
|
||||
nTop := oEdit[E_TOP] +1
|
||||
nLeft := oEdit[E_LEFT] +1
|
||||
nBottom := oEdit[E_BOTTOM] -1
|
||||
nRight := oEdit[E_RIGHT] -1
|
||||
IF( lFrame != NIL .AND. !lFrame )
|
||||
nLeft--
|
||||
nBottom++
|
||||
nRight++
|
||||
ENDIF
|
||||
nState =oEdit[E_RIGHT] -8
|
||||
nState := oEdit[E_RIGHT] -8
|
||||
|
||||
/* It uses static variable 'oEditor' to speed access to the editor
|
||||
If this function is called recursively then we have to push
|
||||
@@ -409,21 +409,21 @@ LOCAL lSaveAllowed, lSaved:=.F.
|
||||
ED_Config( oEditor[E_EDIT], nTop, nLeft, nBottom, nRight, 0, 0 )
|
||||
|
||||
DO WHILE .T.
|
||||
nRow =ED_Stabilize() //displays all visible lines
|
||||
nRow := ED_Stabilize() //displays all visible lines
|
||||
// It don't uses incremantal stabilization for performance reasons
|
||||
|
||||
IF( nRow != ED_Row() )
|
||||
nRow =ED_Row()
|
||||
nRow := ED_Row()
|
||||
@ oEditor[E_TOP], nState SAY STRZERO( nRow,4 )
|
||||
ENDIF
|
||||
IF( nCol != ED_Col() )
|
||||
nCol =ED_Col()
|
||||
nCol := ED_Col()
|
||||
@ oEditor[E_TOP], nState+5 SAY STRZERO( nCol,3 )
|
||||
ENDIF
|
||||
SETPOS( nTop+ED_WinRow(), nLeft+ED_WinCol() )
|
||||
|
||||
// nKey =WaitForKey()
|
||||
nKey =INKEY(0)
|
||||
// nKey := WaitForKey()
|
||||
nKey := INKEY(0)
|
||||
|
||||
DO CASE
|
||||
CASE( nKey>=32 .AND. nKey<256 )
|
||||
@@ -432,7 +432,7 @@ LOCAL lSaveAllowed, lSaved:=.F.
|
||||
ENDIF
|
||||
|
||||
CASE( nKey == K_F2 .AND. lSaveAllowed )
|
||||
lSaved :=EditorSave( oEditor ) //save the copy of edited buffer
|
||||
lSaved := EditorSave( oEditor ) //save the copy of edited buffer
|
||||
|
||||
CASE( EditorMove( nKey ) )
|
||||
|
||||
@@ -450,7 +450,7 @@ LOCAL lSaveAllowed, lSaved:=.F.
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
bKey =SETKEY( nKey )
|
||||
bKey := SETKEY( nKey )
|
||||
IFNIL( bKey )
|
||||
IF( oEdit[E_MODE] )
|
||||
EditorKeys( nKey )
|
||||
@@ -501,12 +501,12 @@ LOCAL i
|
||||
|
||||
CASE( nKey == K_TAB )
|
||||
// ED_Tab( lInsert )
|
||||
FOR i=1 TO 4
|
||||
FOR i := 1 TO 4
|
||||
ED_PutChar( 32, lInsert )
|
||||
NEXT
|
||||
|
||||
CASE( nKey == K_INS )
|
||||
lInsert = !lInsert
|
||||
lInsert := !lInsert
|
||||
SET( _SET_INSERT, lInsert )
|
||||
SetCursor( IIF(lInsert, SC_NORMAL, SC_SPECIAL1) )
|
||||
// SayInsert()
|
||||
@@ -559,7 +559,7 @@ LOCAL lMoved:=.T.
|
||||
ED_PWord()
|
||||
|
||||
OTHERWISE
|
||||
lMoved =.F.
|
||||
lMoved := .F.
|
||||
|
||||
ENDCASE
|
||||
|
||||
@@ -573,7 +573,7 @@ STATIC PROCEDURE EditorPush( oEdit )
|
||||
|
||||
ED_Push()
|
||||
AADD( aEdit, oEditor )
|
||||
oEditor =oEdit
|
||||
oEditor := oEdit
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -583,8 +583,8 @@ RETURN
|
||||
STATIC PROCEDURE EditorPop( )
|
||||
LOCAL nLen
|
||||
|
||||
nLen =LEN( aEdit )
|
||||
oEditor =aEdit[ nLen ]
|
||||
nLen := LEN( aEdit )
|
||||
oEditor := aEdit[ nLen ]
|
||||
ASIZE( aEdit, nLen-1 )
|
||||
ED_Pop()
|
||||
|
||||
@@ -596,9 +596,9 @@ RETURN
|
||||
STATIC FUNCTION EditorSave( oEdit )
|
||||
LOCAL nHandle, cFile, cNew
|
||||
|
||||
cFile =EditorCargo(oEdit)
|
||||
cFile := EditorCargo(oEdit)
|
||||
IF( EMPTY(cFile) )
|
||||
cFile ='TESTFILE.TXT' //GetFileName( 10, 10 )
|
||||
cFile := "TESTFILE.TXT" //GetFileName( 10, 10 )
|
||||
ENDIF
|
||||
|
||||
IF( EMPTY(cFile) )
|
||||
@@ -607,9 +607,9 @@ LOCAL nHandle, cFile, cNew
|
||||
/*
|
||||
WorkStart( 75 )
|
||||
IF( FILE(cFile) )
|
||||
cNew =FileExtension( cFile, 'BAK' )
|
||||
cNew := FileExtension( cFile, "BAK" )
|
||||
DELETEFILE( cNew )
|
||||
nHandle =RENAMEFILE( cFile, cNew )
|
||||
nHandle := RENAMEFILE( cFile, cNew )
|
||||
IF( nHandle < 0 )
|
||||
FileError( cFile, -nHandle )
|
||||
WorkEnd()
|
||||
@@ -618,7 +618,7 @@ LOCAL nHandle, cFile, cNew
|
||||
ENDIF
|
||||
ENDIF
|
||||
*/
|
||||
nHandle =FCREATE( cFile, FC_NORMAL )
|
||||
nHandle := FCREATE( cFile, FC_NORMAL )
|
||||
IF( nHandle > 0 )
|
||||
FWRITE( nHandle, EditorGetText(oEdit) )
|
||||
|
||||
@@ -639,7 +639,7 @@ LOCAL oParm
|
||||
|
||||
IF PrintReady()
|
||||
PrintNewQue()
|
||||
PrintSetHead( AppsOwner(), , '-', PRN_OFF )
|
||||
PrintSetHead( AppsOwner(), , "-", PRN_OFF )
|
||||
|
||||
PrintAddJob( oEdit, PRN_EDITOR )
|
||||
PrintJob(PRN_OFF)
|
||||
@@ -656,17 +656,17 @@ EXPORT FUNCTION SaveBox( top,left,bott,right, kolor, patt, head, shadow )
|
||||
LOCAL cBox, cClr, nBottom,nRight
|
||||
|
||||
IF( PCOUNT() > 4 )
|
||||
cClr =SETCOLOR(kolor)
|
||||
cBox =SAVESCREEN(top,left,bott,right)
|
||||
// cBox =BoxShadow(top,left,bott,right, , patt, head, shadow)
|
||||
cClr := SETCOLOR(kolor)
|
||||
cBox := SAVESCREEN(top,left,bott,right)
|
||||
// cBox := BoxShadow(top,left,bott,right, , patt, head, shadow)
|
||||
@ top, left, bott, right BOX patt
|
||||
// nBottom =bott+1
|
||||
// nRight =right+1
|
||||
// nBottom := bott+1
|
||||
// nRight := right+1
|
||||
ELSE
|
||||
cClr =SETCOLOR()
|
||||
cBox =SAVESCREEN(top,left,bott,right)
|
||||
nBottom =bott
|
||||
nRight =right
|
||||
cClr := SETCOLOR()
|
||||
cBox := SAVESCREEN(top,left,bott,right)
|
||||
nBottom := bott
|
||||
nRight := right
|
||||
ENDIF
|
||||
|
||||
RETURN( {top,left,nBottom,nRight, cBox, cClr} )
|
||||
|
||||
@@ -505,22 +505,22 @@ FUNCTION Wvt_Mouse( nKey, nRow, nCol )
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_MOUSEMOVE
|
||||
if aObjects[ nLastObj, WVT_OBJ_STATE ] <> OBJ_STATE_MOUSEOVER
|
||||
if aObjects[ nLastObj, WVT_OBJ_STATE ] != OBJ_STATE_MOUSEOVER
|
||||
aObjects[ nLastObj, WVT_OBJ_STATE ] := OBJ_STATE_MOUSEOVER
|
||||
if aObjects[ nObj, WVT_OBJ_ONMOUSEOVER ] <> nil
|
||||
if aObjects[ nObj, WVT_OBJ_ONMOUSEOVER ] != nil
|
||||
eval( aObjects[ nObj, WVT_OBJ_ONMOUSEOVER ] )
|
||||
endif
|
||||
endif
|
||||
|
||||
CASE nKey == K_LBUTTONDOWN
|
||||
aObjects[ nLastObj, WVT_OBJ_STATE ] := OBJ_STATE_BUTTONDOWN
|
||||
if aObjects[ nObj, WVT_OBJ_ONBUTTONDOWN ] <> nil
|
||||
if aObjects[ nObj, WVT_OBJ_ONBUTTONDOWN ] != nil
|
||||
eval( aObjects[ nObj, WVT_OBJ_ONBUTTONDOWN ] )
|
||||
endif
|
||||
|
||||
CASE nKey == K_LBUTTONUP
|
||||
aObjects[ nLastObj, WVT_OBJ_STATE ] := OBJ_STATE_DISP
|
||||
if aObjects[ nObj, WVT_OBJ_ONBUTTONUP ] <> nil
|
||||
if aObjects[ nObj, WVT_OBJ_ONBUTTONUP ] != nil
|
||||
eval( aObjects[ nObj, WVT_OBJ_ONBUTTONUP ] )
|
||||
endif
|
||||
|
||||
@@ -537,7 +537,7 @@ FUNCTION WvtSetBlocks( a_ )
|
||||
|
||||
o := aclone( s )
|
||||
|
||||
IF a_ <> nil
|
||||
IF a_ != nil
|
||||
s := aclone( a_ )
|
||||
ENDIF
|
||||
|
||||
@@ -552,7 +552,7 @@ FUNCTION WvtSetObjects( aObject )
|
||||
|
||||
oObjects := aclone( aObjects )
|
||||
|
||||
if aObject <> nil
|
||||
if aObject != nil
|
||||
if empty( aObject )
|
||||
aObjects := {}
|
||||
else
|
||||
@@ -575,7 +575,7 @@ FUNCTION SetMouseCheck( lYes )
|
||||
STATIC lSYes := .t.
|
||||
|
||||
lOYes := lSYes
|
||||
if lYes <> nil
|
||||
if lYes != nil
|
||||
lSYes := lYes
|
||||
endif
|
||||
|
||||
@@ -659,11 +659,11 @@ FUNCTION WvtMyBrowse()
|
||||
//oBrowse := TBrowseNew( nTop + 3, nLeft + 2, nBottom - 1, nRight - 2 )
|
||||
oBrowse := TBrowseWVG():New( nTop + 3, nLeft + 2, nBottom - 1, nRight - 2 )
|
||||
|
||||
oBrowse:ColSep = ' '
|
||||
oBrowse:HeadSep = '__'
|
||||
oBrowse:GoTopBlock = { || dbGoTop() }
|
||||
oBrowse:GoBottomBlock = { || dbGoBottom() }
|
||||
oBrowse:SkipBlock = { | nSkip | dbSkipBlock( nSkip,oBrowse ) }
|
||||
oBrowse:ColSep := ' '
|
||||
oBrowse:HeadSep := '__'
|
||||
oBrowse:GoTopBlock := { || dbGoTop() }
|
||||
oBrowse:GoBottomBlock := { || dbGoBottom() }
|
||||
oBrowse:SkipBlock := { | nSkip | dbSkipBlock( nSkip,oBrowse ) }
|
||||
|
||||
for i := 1 to len( info_ )
|
||||
bBlock := VouBlockField( i )
|
||||
@@ -695,7 +695,7 @@ FUNCTION WvtMyBrowse()
|
||||
While !lEnd
|
||||
oBrowse:ForceStable()
|
||||
|
||||
nKey = InKey( 0 )
|
||||
nKey := InKey( 0 )
|
||||
|
||||
BrwHandleKey( oBrowse, nKey, @lEnd )
|
||||
|
||||
@@ -728,7 +728,7 @@ STATIC FUNCTION DbSkipBlock( n, oTbr )
|
||||
|
||||
LOCAL nSkipped := 0
|
||||
|
||||
if n = 0
|
||||
if n == 0
|
||||
DBSkip( 0 )
|
||||
|
||||
elseif n > 0
|
||||
@@ -782,7 +782,7 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd )
|
||||
|
||||
do case
|
||||
case nKey == K_ESC
|
||||
lEnd = .t.
|
||||
lEnd.t.
|
||||
|
||||
case nKey == K_ENTER
|
||||
lEnd := .t.
|
||||
@@ -799,34 +799,34 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd )
|
||||
case nKey == K_RIGHT
|
||||
oBrowse:Right()
|
||||
|
||||
case nKey = K_PGDN
|
||||
case nKey == K_PGDN
|
||||
oBrowse:pageDown()
|
||||
|
||||
case nKey = K_PGUP
|
||||
case nKey == K_PGUP
|
||||
oBrowse:pageUp()
|
||||
|
||||
case nKey = K_CTRL_PGUP
|
||||
case nKey == K_CTRL_PGUP
|
||||
oBrowse:goTop()
|
||||
|
||||
case nKey = K_CTRL_PGDN
|
||||
case nKey == K_CTRL_PGDN
|
||||
oBrowse:goBottom()
|
||||
|
||||
case nKey = K_HOME
|
||||
case nKey == K_HOME
|
||||
oBrowse:home()
|
||||
|
||||
case nKey = K_END
|
||||
case nKey == K_END
|
||||
oBrowse:end()
|
||||
|
||||
case nKey = K_CTRL_LEFT
|
||||
case nKey == K_CTRL_LEFT
|
||||
oBrowse:panLeft()
|
||||
|
||||
case nKey = K_CTRL_RIGHT
|
||||
case nKey == K_CTRL_RIGHT
|
||||
oBrowse:panRight()
|
||||
|
||||
case nKey = K_CTRL_HOME
|
||||
case nKey == K_CTRL_HOME
|
||||
oBrowse:panHome()
|
||||
|
||||
case nKey = K_CTRL_END
|
||||
case nKey == K_CTRL_END
|
||||
oBrowse:panEnd()
|
||||
|
||||
case nKey == K_MWBACKWARD
|
||||
@@ -860,38 +860,38 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey )
|
||||
case nKey == K_RIGHT
|
||||
oBrowse:Right()
|
||||
|
||||
case nKey = K_PGDN
|
||||
case nKey == K_PGDN
|
||||
oBrowse:pageDown()
|
||||
lRefAll := .t.
|
||||
|
||||
case nKey = K_PGUP
|
||||
case nKey == K_PGUP
|
||||
oBrowse:pageUp()
|
||||
lRefAll := .t.
|
||||
|
||||
case nKey = K_CTRL_PGUP
|
||||
case nKey == K_CTRL_PGUP
|
||||
oBrowse:goTop()
|
||||
lRefAll := .t.
|
||||
|
||||
case nKey = K_CTRL_PGDN
|
||||
case nKey == K_CTRL_PGDN
|
||||
oBrowse:goBottom()
|
||||
lRefAll := .t.
|
||||
|
||||
case nKey = K_HOME
|
||||
case nKey == K_HOME
|
||||
oBrowse:home()
|
||||
|
||||
case nKey = K_END
|
||||
case nKey == K_END
|
||||
oBrowse:end()
|
||||
|
||||
case nKey = K_CTRL_LEFT
|
||||
case nKey == K_CTRL_LEFT
|
||||
oBrowse:panLeft()
|
||||
|
||||
case nKey = K_CTRL_RIGHT
|
||||
case nKey == K_CTRL_RIGHT
|
||||
oBrowse:panRight()
|
||||
|
||||
case nKey = K_CTRL_HOME
|
||||
case nKey == K_CTRL_HOME
|
||||
oBrowse:panHome()
|
||||
|
||||
case nKey = K_CTRL_END
|
||||
case nKey == K_CTRL_END
|
||||
oBrowse:panEnd()
|
||||
|
||||
case nKey == K_MWBACKWARD
|
||||
@@ -1018,7 +1018,7 @@ FUNCTION WvtPartialScreen()
|
||||
|
||||
wvtScr1 := Wvt_SaveScreen( 7,20,15,60 )
|
||||
|
||||
do while inkey( 0 ) <> K_ESC
|
||||
do while inkey( 0 ) != K_ESC
|
||||
enddo
|
||||
|
||||
DispBox( 7, 20, 15, 60, ' ', 'W/B*' )
|
||||
@@ -1027,12 +1027,12 @@ FUNCTION WvtPartialScreen()
|
||||
@ 13,25 SAY 'Press Esc ' COLOR 'N/B*'
|
||||
Wvt_DrawBoxRecessed( 8,22,14,58 )
|
||||
|
||||
do while inkey( 0 ) <> K_ESC
|
||||
do while inkey( 0 ) != K_ESC
|
||||
enddo
|
||||
|
||||
Wvt_RestScreen( 7,20,15,60, wvtScr1 )
|
||||
|
||||
do while inkey( 0 ) <> K_ESC
|
||||
do while inkey( 0 ) != K_ESC
|
||||
enddo
|
||||
|
||||
RestScreen( 7,20,15,60,scr )
|
||||
@@ -1088,7 +1088,7 @@ function WvtLines()
|
||||
@ 15,8 Say 'D'
|
||||
@ 16,9 Say 'E'
|
||||
|
||||
do while ( inkey(0) <> 27 )
|
||||
do while ( inkey(0) != 27 )
|
||||
enddo
|
||||
|
||||
// Restore Environments
|
||||
@@ -1136,7 +1136,7 @@ FUNCTION Popups( nID, lDestroy )
|
||||
return nil
|
||||
endif
|
||||
|
||||
if lDestroy <> nil
|
||||
if lDestroy != nil
|
||||
Wvt_DestroyMenu( hPop_[ nID ] )
|
||||
return nil
|
||||
endif
|
||||
@@ -1197,8 +1197,8 @@ FUNCTION Popups( nID, lDestroy )
|
||||
|
||||
FUNCTION WvtPictures( nSlot,cFilePic )
|
||||
|
||||
if nSlot <> nil .and. nSlot <= 20 .and. file( cFilePic )
|
||||
if pic_[ nSlot ] <> cFilePic
|
||||
if nSlot != nil .and. nSlot <= 20 .and. file( cFilePic )
|
||||
if pic_[ nSlot ] != cFilePic
|
||||
if Wvt_LoadPicture( cFilePic, nSlot )
|
||||
pic_[ nSlot ] := cFilePic
|
||||
endif
|
||||
@@ -1211,7 +1211,7 @@ FUNCTION WvtPictures( nSlot,cFilePic )
|
||||
|
||||
FUNCTION WvtExePicture( nTop, nLeft, nBottom, nRight, nSlot, aOffset )
|
||||
|
||||
if pic_[ nSlot ] <> nil
|
||||
if pic_[ nSlot ] != nil
|
||||
Wvt_DrawPicture( nTop, nLeft, nBottom, nRight, nSlot, aOffSet )
|
||||
endif
|
||||
|
||||
@@ -1725,7 +1725,7 @@ Function DynDlgProc_1( hDlg, nMsg, wParam, lParam )
|
||||
|
||||
case wParam == 11
|
||||
lClicked := ( Win_IsDlgButtonChecked( hDlg,11 ) == 1 )
|
||||
Win_MessageBox( hDlg, 'Button ' + if( lClicked, 'Clicked', 'Unclicked' ), 'CheckBoxStatus' )
|
||||
Win_MessageBox( hDlg, 'Button ' + iif( lClicked, 'Clicked', 'Unclicked' ), 'CheckBoxStatus' )
|
||||
|
||||
endcase
|
||||
exit
|
||||
@@ -1768,7 +1768,7 @@ Function DynDialog_2()
|
||||
|
||||
aDlg := Wvt_MakeDlgTemplate( 1, 4, 21, 60, {0,0,0,0}, ;
|
||||
'Dialog First [ ' + ltrim( str( nInfo,10,0 ) ) + ' ] '+;
|
||||
if( nInfo%2==0, 'Modeless', 'Modal' ),' Dialog !', nStyle )
|
||||
iif( nInfo%2==0, 'Modeless', 'Modal' ),' Dialog !', nStyle )
|
||||
|
||||
// Multi line edit control
|
||||
//
|
||||
@@ -1867,7 +1867,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam )
|
||||
|
||||
case wParam == ID_CHK_SATIS
|
||||
lClicked := ( Win_IsDlgButtonChecked( hDlg,ID_CHK_SATIS ) == 1 )
|
||||
Win_MessageBox( hDlg, if( lClicked, 'Satisfied', 'UnSatisfied' ), 'CheckBoxStatus' )
|
||||
Win_MessageBox( hDlg, iif( lClicked, 'Satisfied', 'UnSatisfied' ), 'CheckBoxStatus' )
|
||||
|
||||
case wParam == ID_RDO_XH
|
||||
Win_MessageBox( hDlg, '(x)Harbour', 'Compiler' )
|
||||
@@ -1927,7 +1927,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam )
|
||||
Win_SetTimer( hDlg, 5001, 1000 ) // 1 sec
|
||||
|
||||
if empty( ahFonts )
|
||||
if ( hFont := Wvt_CreateFont( "Times New Roman", 18 ) ) <> 0
|
||||
if ( hFont := Wvt_CreateFont( "Times New Roman", 18 ) ) != 0
|
||||
aadd( ahFonts, hFont )
|
||||
endif
|
||||
endif
|
||||
@@ -1939,7 +1939,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam )
|
||||
if shIcon == nil
|
||||
shIcon := Win_LoadIcon( 'Vr_1.ico' )
|
||||
endif
|
||||
if shIcon <> nil .or. shIcon <> 0
|
||||
if shIcon != nil .or. shIcon != 0
|
||||
Win_SendMessage( Win_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, shIcon )
|
||||
endif
|
||||
|
||||
@@ -1947,7 +1947,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam )
|
||||
if shImage == nil
|
||||
shImage := Win_LoadImage( 'Vouch1.bmp', 2 )
|
||||
endif
|
||||
if shImage <> nil .and. shImage <> 0
|
||||
if shImage != nil .and. shImage != 0
|
||||
Win_SendMessage( Win_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, shImage )
|
||||
endif
|
||||
*/
|
||||
@@ -2030,11 +2030,11 @@ EXIT PROCEDURE CleanHandles()
|
||||
Win_DeleteObject( ahFonts[ i ] )
|
||||
next
|
||||
|
||||
if shIcon <> nil
|
||||
if shIcon != nil
|
||||
Win_DeleteObject( shIcon )
|
||||
endif
|
||||
|
||||
if shImage <> nil
|
||||
if shImage != nil
|
||||
Win_DeleteObject( shImage )
|
||||
endif
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Procedure Main()
|
||||
local n, a
|
||||
local c
|
||||
|
||||
if fileattr( "test_1.out") = 1 + 32
|
||||
if fileattr( "test_1.out") == 1 + 32
|
||||
setfattr( "test_1.out", 32 )
|
||||
ferase( "test_1.out" )
|
||||
endif
|
||||
@@ -64,7 +64,7 @@ Procedure Main()
|
||||
c := 0
|
||||
while .t.
|
||||
? hb_btreekey( n ), hb_btreedata( n ), ++c
|
||||
if 1 <> hb_btreeskip( n, 1 )// .or. c == hb_btreeinfo( n, HB_BTREEINFO_KEYCOUNT )-1
|
||||
if 1 != hb_btreeskip( n, 1 )// .or. c == hb_btreeinfo( n, HB_BTREEINFO_KEYCOUNT )-1
|
||||
exit
|
||||
endif
|
||||
end
|
||||
@@ -76,7 +76,7 @@ Procedure Main()
|
||||
c := 0
|
||||
while .t.
|
||||
? hb_btreekey( n ), hb_btreedata( n ), ++c
|
||||
if -1 <> hb_btreeskip( n, -1 )// .or. c == hb_btreeinfo( n, HB_BTREEINFO_KEYCOUNT )-1
|
||||
if -1 != hb_btreeskip( n, -1 )// .or. c == hb_btreeinfo( n, HB_BTREEINFO_KEYCOUNT )-1
|
||||
exit
|
||||
endif
|
||||
end
|
||||
@@ -143,7 +143,7 @@ Procedure Main()
|
||||
c := 0
|
||||
while .t.
|
||||
? hb_btreekey( n ), hb_btreedata( n ), ++c
|
||||
if 1 <> hb_btreeskip( n, 1 )
|
||||
if 1 != hb_btreeskip( n, 1 )
|
||||
exit
|
||||
endif
|
||||
end
|
||||
@@ -154,7 +154,7 @@ Procedure Main()
|
||||
c := 0
|
||||
while .t.
|
||||
? hb_btreekey( n ), hb_btreedata( n ), ++c
|
||||
if -1 <> hb_btreeskip( n, -1 )
|
||||
if -1 != hb_btreeskip( n, -1 )
|
||||
exit
|
||||
endif
|
||||
end
|
||||
|
||||
@@ -62,7 +62,7 @@ Procedure TTest()
|
||||
n:gotop()
|
||||
while .t.
|
||||
? n:key(), n:data()
|
||||
if 1 <> n:skip( 1 )
|
||||
if 1 != n:skip( 1 )
|
||||
exit
|
||||
endif
|
||||
end
|
||||
@@ -72,7 +72,7 @@ Procedure TTest()
|
||||
n:gobottom()
|
||||
while .t.
|
||||
? n:key(), n:data()
|
||||
if -1 <> n:skip( -1 )
|
||||
if -1 != n:skip( -1 )
|
||||
exit
|
||||
endif
|
||||
end
|
||||
|
||||
@@ -23,7 +23,7 @@ function Test()
|
||||
|
||||
GaugeDisplay( aGauge )
|
||||
|
||||
while i <> K_ESC
|
||||
while i != K_ESC
|
||||
i := Inkey( 0 )
|
||||
do case
|
||||
case i == K_UP
|
||||
|
||||
@@ -63,7 +63,7 @@ FUNCTION SAVEGETS()
|
||||
RETURN aGetList
|
||||
|
||||
FUNCTION RESTGETS( aGetList )
|
||||
RETURN ( GetList := aGetList ) <> NIL
|
||||
RETURN ( GetList := aGetList ) != NIL
|
||||
|
||||
FUNCTION COUNTGETS()
|
||||
RETURN LEN( GetList )
|
||||
|
||||
@@ -71,7 +71,7 @@ FUNCTION GETINPUT( xVar, nRow, nCol, lSay, xPrompt )
|
||||
ENDIF
|
||||
|
||||
SETPOS( nRow, nCol )
|
||||
IF xPrompt <> Nil
|
||||
IF xPrompt != Nil
|
||||
DEVOUT( xPrompt )
|
||||
nRow := ROW()
|
||||
nCol := COL() + 1
|
||||
|
||||
@@ -74,7 +74,7 @@ FUNCTION GETSECRET( cVar, nRow, nCol, lSay, xPrompt )
|
||||
ENDIF
|
||||
|
||||
SETPOS( nRow, nCol )
|
||||
IF xPrompt <> Nil
|
||||
IF xPrompt != Nil
|
||||
DEVOUT( xPrompt )
|
||||
nRow := ROW()
|
||||
nCol := COL() + 1
|
||||
|
||||
@@ -79,7 +79,7 @@ STATIC PROCEDURE doKeyTime( nKey, cClockTime, nHour, nMin, nSec, nLast )
|
||||
LOCAL nMn := VAL( SUBSTR( ccTime, 4, 2 ) )
|
||||
LOCAL nSc := VAL( SUBSTR( ccTime, 7, 2 ) )
|
||||
|
||||
IF nHour = 99
|
||||
IF nHour == 99
|
||||
IF nHr > nLast
|
||||
__KEYBOARD( nKey )
|
||||
nLast := nHr
|
||||
@@ -88,7 +88,7 @@ STATIC PROCEDURE doKeyTime( nKey, cClockTime, nHour, nMin, nSec, nLast )
|
||||
s_hIdle := NIL
|
||||
ENDIF
|
||||
ENDIF
|
||||
ELSEIF nMin = 99 .AND. nHr == nHour
|
||||
ELSEIF nMin == 99 .AND. nHr == nHour
|
||||
IF nMn > nLast
|
||||
__KEYBOARD( nKey )
|
||||
nLast := nMn
|
||||
@@ -97,7 +97,7 @@ STATIC PROCEDURE doKeyTime( nKey, cClockTime, nHour, nMin, nSec, nLast )
|
||||
s_hIdle := NIL
|
||||
ENDIF
|
||||
ENDIF
|
||||
ELSEIF nSec = 99 .AND. nHr == nHour .AND. nMn == nMin
|
||||
ELSEIF nSec == 99 .AND. nHr == nHour .AND. nMn == nMin
|
||||
IF nSc > nLast
|
||||
__KEYBOARD( nKey )
|
||||
nLast := nSc
|
||||
|
||||
@@ -89,8 +89,8 @@ Default cPad to " "
|
||||
Default nBase to 10
|
||||
|
||||
IF VALTYPE( xNum ) == "C"
|
||||
xNum = UPPER( ALLTRIM( xNum ) )
|
||||
xNum = CTON( xNum, 16 )
|
||||
xNum := UPPER( ALLTRIM( xNum ) )
|
||||
xNum := CTON( xNum, 16 )
|
||||
ENDIF
|
||||
IF nBase > 36 .OR. nBase < 2
|
||||
RETURN ""
|
||||
@@ -99,13 +99,13 @@ ENDIF
|
||||
if xNum < 0
|
||||
xNum += 4294967296
|
||||
endif
|
||||
cNum = B10TOBN( xNum, @nBase )
|
||||
cNum := B10TOBN( xNum, @nBase )
|
||||
|
||||
IF ISNUMBER( nLenght )
|
||||
IF LEN(cNum) > nLenght
|
||||
cNum = REPLICATE( "*", nLenght )
|
||||
cNum := REPLICATE( "*", nLenght )
|
||||
ELSEIF ISCHARACTER( cPad ) .AND. LEN( cNum ) < nLenght
|
||||
cNum = REPLICATE( cPad, nLenght - LEN( cNum ) ) + cNum
|
||||
cNum := REPLICATE( cPad, nLenght - LEN( cNum ) ) + cNum
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -216,17 +216,17 @@ FUNCTION BITTOC( nInteger, cBitPattern, lMode )
|
||||
|
||||
|
||||
cBitPattern := RIGHT( cBitPattern, 16 )
|
||||
cBinary = NTOC( nInteger, 2, 16 )
|
||||
cBinary := NTOC( nInteger, 2, 16 )
|
||||
|
||||
FOR nI = 1 TO 16
|
||||
FOR nI := 1 TO 16
|
||||
|
||||
IF SUBSTR( cBinary, -nI, 1 ) == '1'
|
||||
|
||||
cString = SUBSTR( cBitPattern, -nI, 1 ) + cString
|
||||
cString := SUBSTR( cBitPattern, -nI, 1 ) + cString
|
||||
|
||||
ELSEIF lMode
|
||||
|
||||
cString = ' ' + cString
|
||||
cString := ' ' + cString
|
||||
|
||||
ENDIF
|
||||
|
||||
@@ -264,12 +264,12 @@ FUNCTION CTOBIT( cCharString, cBitPattern )
|
||||
|
||||
LOCAL nI, cString := ''
|
||||
|
||||
cCharString = RIGHT( cCharString, 16 )
|
||||
cBitPattern = RIGHT( cBitPattern, 16 )
|
||||
cCharString := RIGHT( cCharString, 16 )
|
||||
cBitPattern := RIGHT( cBitPattern, 16 )
|
||||
|
||||
FOR nI = 1 TO LEN( cBitPattern )
|
||||
FOR nI := 1 TO LEN( cBitPattern )
|
||||
|
||||
cString = IF( AT(SUBSTR( cBitPattern, -nI, 1), cCharString) > 0, '1', '0') + cString
|
||||
cString := IF( AT(SUBSTR( cBitPattern, -nI, 1), cCharString) > 0, '1', '0') + cString
|
||||
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ METHOD Delete( oRow, cWhere ) CLASS TFbServer
|
||||
|
||||
cWhere += aKeys[i] + '=' + DataToSql(xField)
|
||||
|
||||
if i <> len(aKeys)
|
||||
if i != len(aKeys)
|
||||
cWhere += ','
|
||||
end
|
||||
Next
|
||||
@@ -430,7 +430,7 @@ METHOD Update( oRow, cWhere ) CLASS TFbServer
|
||||
|
||||
cWhere += aKeys[i] + '=' + DataToSql(xField)
|
||||
|
||||
if i <> len(aKeys)
|
||||
if i != len(aKeys)
|
||||
cWhere += ', '
|
||||
end
|
||||
Next
|
||||
@@ -954,7 +954,7 @@ Static Function StructConvert( aStru, db, dialect)
|
||||
xtables += DataToSql(aStru[i, 5])
|
||||
xfields += DataToSql(aStru[i, 1])
|
||||
|
||||
if i <> len(aStru)
|
||||
if i != len(aStru)
|
||||
xtables += ','
|
||||
xfields += ','
|
||||
end
|
||||
|
||||
@@ -189,7 +189,7 @@ FUNCTION gdImageToString( oImage )
|
||||
|
||||
IF ValType( oImage ) == "O" .AND. ( oImage:ClassName == "GDIMAGE" .OR. oImage:IsDerivedFrom( "GDIMAGE" ) )
|
||||
WITH OBJECT oImage
|
||||
IF :cType <> NIL
|
||||
IF :cType != NIL
|
||||
DO CASE
|
||||
CASE :cType == "jpeg"
|
||||
cString := :ToStringJpeg()
|
||||
@@ -213,7 +213,7 @@ PROCEDURE gdImageToFile( oImage, cFile )
|
||||
|
||||
IF ValType( oImage ) == "O" .AND. ( oImage:ClassName == "GDIMAGE" .OR. oImage:IsDerivedFrom( "GDIMAGE" ) )
|
||||
WITH OBJECT oImage
|
||||
IF :cType <> NIL
|
||||
IF :cType != NIL
|
||||
DO CASE
|
||||
CASE :cType == "jpeg"
|
||||
cString := :ToStringJpeg()
|
||||
@@ -225,7 +225,7 @@ PROCEDURE gdImageToFile( oImage, cFile )
|
||||
cString := :ToStringPng()
|
||||
cExt := "png"
|
||||
ENDCASE
|
||||
IF cString <> NIL
|
||||
IF cString != NIL
|
||||
MemoWrit( cFile + "." + cExt, cString )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -243,7 +243,7 @@ PROCEDURE gdImageToHandle( oImage, nHandle )
|
||||
|
||||
IF ValType( oImage ) == "O" .AND. ( oImage:ClassName == "GDIMAGE" .OR. oImage:IsDerivedFrom( "GDIMAGE" ) )
|
||||
WITH OBJECT oImage
|
||||
IF :cType <> NIL
|
||||
IF :cType != NIL
|
||||
DO CASE
|
||||
CASE :cType == "jpeg"
|
||||
:OutputJpeg( nHandle )
|
||||
|
||||
@@ -208,7 +208,7 @@ METHOD DrawSingleBar( pcode ) CLASS TBarCode
|
||||
|
||||
For i := 1 TO ::res
|
||||
::Line( ::positionX + i , ::positionY , ::positionX + i , (::positionY+::maxHeight) ,;
|
||||
If( SubStr(pcode,j,1) $ "0", ::BackColor, ::FillColor ) )
|
||||
iif( SubStr(pcode,j,1) $ "0", ::BackColor, ::FillColor ) )
|
||||
Next
|
||||
|
||||
::NextX()
|
||||
@@ -234,8 +234,8 @@ METHOD DrawSingleI25( pcode ) CLASS TBarCode
|
||||
|
||||
For j := 1 To Len( pcode )
|
||||
|
||||
imgBar := If( j % 2 == 0, ::FillColor, ::BackColor )
|
||||
imgWid := If( SubStr(pcode,j,1) =="0" , widthSlimBar, widthFatBar )
|
||||
imgBar := iif( j % 2 == 0, ::FillColor, ::BackColor )
|
||||
imgWid := iif( SubStr(pcode,j,1) =="0" , widthSlimBar, widthFatBar )
|
||||
|
||||
end_y := ::maxHeight
|
||||
|
||||
@@ -255,7 +255,7 @@ METHOD DrawError(ptext) CLASS TBarCode
|
||||
|
||||
::error++
|
||||
|
||||
::lastX := If( (::GetFontWidth()*Len(ptext) ) > ::lastX , ( ::GetFontWidth()*Len(ptext)) , ::lastX )
|
||||
::lastX := iif( (::GetFontWidth()*Len(ptext) ) > ::lastX , ( ::GetFontWidth()*Len(ptext)) , ::lastX )
|
||||
::lastY := ::error*15
|
||||
|
||||
Return NIL
|
||||
@@ -279,13 +279,13 @@ METHOD DrawText(lIsI25) CLASS TBarCode
|
||||
DEFAULT lIsI25 TO .F.
|
||||
|
||||
If lIsI25
|
||||
If( ::textfont != 0 )
|
||||
If ::textfont != 0
|
||||
xPosition := 10 * ::GetFontWidth()
|
||||
::say( xPosition, ::maxHeight, "*" + ::text + "*" , ::FillColor )
|
||||
::lastY := ::maxHeight + ::GetFontHeight()
|
||||
EndIf
|
||||
Else
|
||||
If( ::textfont != 0 )
|
||||
If ::textfont != 0
|
||||
xPosition := ( ::positionX / 2) - ( Len( ::text ) /2 ) * ::GetFontWidth()
|
||||
::say( xPosition, ::maxHeight, ::text, ::FillColor )
|
||||
::lastY := ::maxHeight + ::GetFontHeight()
|
||||
@@ -300,7 +300,7 @@ METHOD CheckCode() CLASS TBarCode
|
||||
LOCAL i
|
||||
|
||||
For i := 1 To Len( ::text )
|
||||
If( !IsInt( ::CheckValInArray( SubStr( ::text, i, 1 ) ) ) )
|
||||
If !IsInt( ::CheckValInArray( SubStr( ::text, i, 1 ) ) )
|
||||
::DrawError("Character "+SubStr( ::text, i, 1 )+" not allowed .")
|
||||
lRet := .F.
|
||||
EndIf
|
||||
@@ -329,7 +329,7 @@ METHOD Finish( image_style, quality, nFG ) CLASS TBarCode
|
||||
DEFAULT quality TO 95
|
||||
DEFAULT nFG TO {255,255,255}
|
||||
|
||||
If Empty( ::filename ) .OR. ::filename = NIL
|
||||
If Empty( ::filename ) .OR. ::filename == NIL
|
||||
|
||||
// Output std handle == 1
|
||||
|
||||
|
||||
@@ -194,9 +194,9 @@ METHOD Draw13(cText) CLASS TCode
|
||||
|
||||
If !lerror
|
||||
|
||||
If( ::book .AND. Len( ::text) != 10 )
|
||||
If ::book .AND. Len( ::text) != 10
|
||||
::DrawError("Must contains 10 chars if ISBN is true.")
|
||||
lerror = .T.
|
||||
lerror := .T.
|
||||
EndIf
|
||||
|
||||
// book, we changed the code to the right
|
||||
@@ -207,13 +207,13 @@ METHOD Draw13(cText) CLASS TCode
|
||||
// contain only 12 characters ?
|
||||
If Len( ::text ) != 12
|
||||
::DrawError( "Must contains 12 chars, the 13th digit is automatically added.")
|
||||
lerror = .t.
|
||||
lerror := .t.
|
||||
EndIf
|
||||
|
||||
If !lerror
|
||||
|
||||
// If we have to write text, we moved the barcode to the right to have space to put digit
|
||||
::positionX = If( ::textfont == 0 , 0, 10 )
|
||||
::positionX := iif( ::textfont == 0 , 0, 10 )
|
||||
|
||||
xParity := ::Parity[ Val( SubStr( ::text, 1, 1 ) ) ]
|
||||
|
||||
@@ -228,14 +228,14 @@ METHOD Draw13(cText) CLASS TCode
|
||||
For ii := 1 To Len( ::text )
|
||||
|
||||
// Calculate check digit
|
||||
If Mod( ((Len(::text) + 1) - ii), 2 ) = 0
|
||||
If Mod( ((Len(::text) + 1) - ii), 2 ) == 0
|
||||
nchkSum := nchkSum + Int( Val( Substr(::text , ii, 1) ) )
|
||||
Else
|
||||
nchkSum := nchkSum + Int( Val( Substr( ::text , ii, 1) ) ) * 3
|
||||
EndIf
|
||||
|
||||
// ANow, the bar of the middle
|
||||
If ii = 8
|
||||
If ii == 8
|
||||
::positionX += 1
|
||||
::maxHeight := ::maxHeight + 9
|
||||
::DrawSingleBar("101")
|
||||
@@ -245,13 +245,13 @@ METHOD Draw13(cText) CLASS TCode
|
||||
|
||||
jj := Val( SubStr( ::text, ii, 1) )
|
||||
|
||||
If jj = 0
|
||||
If jj == 0
|
||||
jj := 10
|
||||
EndIf
|
||||
|
||||
If ii > 1 .And. ii < 8
|
||||
|
||||
::DrawSingleBar( If( Substr(xParity, ii - 1, 1) = "E",;
|
||||
::DrawSingleBar( iif( Substr(xParity, ii - 1, 1) == "E",;
|
||||
::LeftHand_Even[jj],;
|
||||
::LeftHand_Odd[jj] ) )
|
||||
ElseIf ii > 1 .And. ii >= 8
|
||||
@@ -264,8 +264,8 @@ METHOD Draw13(cText) CLASS TCode
|
||||
|
||||
jj := Mod( nchkSum, 10 )
|
||||
|
||||
If jj <> 0
|
||||
nChk = 10 - jj
|
||||
If jj != 0
|
||||
nChk := 10 - jj
|
||||
EndIf
|
||||
|
||||
If nChk == 0
|
||||
@@ -326,7 +326,7 @@ METHOD Draw8( cText ) CLASS TCode
|
||||
|
||||
If !lerror
|
||||
|
||||
::positionX = If( ::textfont == 0 , 0, 10 )
|
||||
::positionX := iif( ::textfont == 0 , 0, 10 )
|
||||
|
||||
xParity := ::Parity[ 7 ]
|
||||
|
||||
@@ -338,15 +338,15 @@ METHOD Draw8( cText ) CLASS TCode
|
||||
// Start Code
|
||||
::maxHeight := ::maxHeight - 9
|
||||
|
||||
For ii = 1 To Len(::text)
|
||||
For ii := 1 To Len(::text)
|
||||
|
||||
If Mod( ((Len(::text) + 1 ) - ii ), 2 ) = 0
|
||||
If Mod( ((Len(::text) + 1 ) - ii ), 2 ) == 0
|
||||
nchkSum := nchkSum + Int( Val(Substr( ::text, ii, 1) ) )
|
||||
Else
|
||||
nchkSum := nchkSum + Int( Val(Substr( ::text, ii, 1) ) ) * 3
|
||||
EndIf
|
||||
|
||||
If ii = 5
|
||||
If ii == 5
|
||||
::positionX += 1
|
||||
::maxHeight := ::maxHeight + 9
|
||||
::DrawSingleBar("01010")
|
||||
@@ -370,8 +370,8 @@ METHOD Draw8( cText ) CLASS TCode
|
||||
|
||||
jj := Mod( nchkSum, 10 )
|
||||
|
||||
If jj <> 0
|
||||
nChk = 10 - jj
|
||||
If jj != 0
|
||||
nChk := 10 - jj
|
||||
EndIf
|
||||
|
||||
::DrawSingleBar(::Right_Hand[nChk])
|
||||
@@ -468,7 +468,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
|
||||
|
||||
If ::FindCharCode( ::KeysmodeB, SubStr( ::Text, i, 1 ) ) == 0
|
||||
::DrawError('Char '+ SubStr( ::text, i, 1 )+" not allowed.")
|
||||
lerror = .T.
|
||||
lerror := .T.
|
||||
EndIf
|
||||
|
||||
ElseiF cModeCode == "A"
|
||||
@@ -486,7 +486,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
|
||||
|
||||
If Empty(cModeCode)
|
||||
|
||||
If Str( Val( ::text ), Len( ::text ) ) = ::text
|
||||
If Str( Val( ::text ), Len( ::text ) ) == ::text
|
||||
|
||||
lTypeCodeC := .T.
|
||||
cconc := ::aCode[ STARTC ]
|
||||
@@ -495,7 +495,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
|
||||
Else
|
||||
|
||||
For n := 1 TO Len( ::text )
|
||||
nC += If( substr( ::text ,n,1 ) > 31, 1, 0 )
|
||||
nC += iif( substr( ::text ,n,1 ) > 31, 1, 0 )
|
||||
Next
|
||||
|
||||
If nC < Len( ::text ) / 2
|
||||
@@ -542,7 +542,7 @@ METHOD Draw128( cText, cModeCode ) CLASS TCode
|
||||
|
||||
if lTypeCodeC
|
||||
|
||||
If Len( ::TEXT ) = n
|
||||
If Len( ::TEXT ) == n
|
||||
cconc += ::aCode[101]
|
||||
nvalchar := Asc(cchar)-31
|
||||
Else
|
||||
@@ -620,11 +620,11 @@ METHOD GenCodei25() CLASS TCode
|
||||
|
||||
If !lError
|
||||
|
||||
bc_string = upper( ::text )
|
||||
bc_string := upper( ::text )
|
||||
|
||||
// encode itemId to I25 barcode standard. //////////////////////////////////////
|
||||
|
||||
bc_string = ::MixCode( bc_string )
|
||||
bc_string := ::MixCode( bc_string )
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//Adding Start and Stop Pattern
|
||||
|
||||
@@ -93,25 +93,25 @@ CLASS GDImage
|
||||
METHOD CreateTrueColor( sx, sy ) INLINE ::pImage := gdImageCreateTrueColor( sx, sy ), Self
|
||||
|
||||
// Load From File
|
||||
METHOD LoadFromPng( cFile ) INLINE ::pImage := gdImageCreateFromPng( cFile ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD LoadFromJpeg( cFile ) INLINE ::pImage := gdImageCreateFromJpeg( cFile ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD LoadFromWBmp( cFile ) INLINE ::pImage := gdImageCreateFromWBMP( cFile ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD LoadFromGd( cFile ) INLINE ::pImage := gdImageCreateFromGD( cFile ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD LoadFromGif( cFile ) INLINE ::pImage := gdImageCreateFromGif( cFile ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD LoadFromPng( cFile ) INLINE ::pImage := gdImageCreateFromPng( cFile ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD LoadFromJpeg( cFile ) INLINE ::pImage := gdImageCreateFromJpeg( cFile ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD LoadFromWBmp( cFile ) INLINE ::pImage := gdImageCreateFromWBMP( cFile ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD LoadFromGd( cFile ) INLINE ::pImage := gdImageCreateFromGD( cFile ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD LoadFromGif( cFile ) INLINE ::pImage := gdImageCreateFromGif( cFile ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
|
||||
// Load From a specific File handle
|
||||
METHOD InputPng( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromPng( nHandle, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD InputJpeg( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromJpeg( nHandle, nSize ), IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD InputWBmp( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromWBMP( nHandle, nSize ), IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD InputGd( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromGD( nHandle, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD InputGif( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromGif( nHandle, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD InputPng( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromPng( nHandle, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD InputJpeg( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromJpeg( nHandle, nSize ), IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD InputWBmp( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromWBMP( nHandle, nSize ), IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD InputGd( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromGD( nHandle, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD InputGif( nHandle, nSize ) INLINE ::pImage := gdImageCreateFromGif( nHandle, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
|
||||
// Create from an image pointer in memory
|
||||
METHOD CreateFromPng( pImage, nSize ) INLINE ::pImage := gdImageCreateFromPng( pImage, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD CreateFromJpeg( pImage, nSize ) INLINE ::pImage := gdImageCreateFromJpeg( pImage, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD CreateFromWBmp( pImage, nSize ) INLINE ::pImage := gdImageCreateFromWBMP( pImage, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD CreateFromGd( pImage, nSize ) INLINE ::pImage := gdImageCreateFromGD( pImage, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD CreateFromGif( pImage, nSize ) INLINE ::pImage := gdImageCreateFromGif( pImage, nSize ) , IIF( ::pImage <> NIL, Self, NIL )
|
||||
METHOD CreateFromPng( pImage, nSize ) INLINE ::pImage := gdImageCreateFromPng( pImage, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD CreateFromJpeg( pImage, nSize ) INLINE ::pImage := gdImageCreateFromJpeg( pImage, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD CreateFromWBmp( pImage, nSize ) INLINE ::pImage := gdImageCreateFromWBMP( pImage, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD CreateFromGd( pImage, nSize ) INLINE ::pImage := gdImageCreateFromGD( pImage, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
METHOD CreateFromGif( pImage, nSize ) INLINE ::pImage := gdImageCreateFromGif( pImage, nSize ) , IIF( ::pImage != NIL, Self, NIL )
|
||||
|
||||
METHOD LoadFromFile( cFile )
|
||||
|
||||
|
||||
@@ -30,16 +30,16 @@ PROCEDURE Main()
|
||||
*/
|
||||
|
||||
/* Create the image */
|
||||
im = gdImageCreate(100, 100)
|
||||
im := gdImageCreate(100, 100)
|
||||
|
||||
/* Allocate background */
|
||||
white = gdImageColorAllocate(im, 255, 255, 255)
|
||||
white := gdImageColorAllocate(im, 255, 255, 255)
|
||||
|
||||
/* Allocate drawing color */
|
||||
black = gdImageColorAllocate(im, 0, 0, 0)
|
||||
black := gdImageColorAllocate(im, 0, 0, 0)
|
||||
|
||||
/* Allocate transparent color for animation compression */
|
||||
trans = gdImageColorAllocate(im, 1, 1, 1)
|
||||
trans := gdImageColorAllocate(im, 1, 1, 1)
|
||||
|
||||
/* Draw rectangle */
|
||||
gdImageRectangle(im, 0, 0, 10, 10, black)
|
||||
@@ -53,7 +53,7 @@ PROCEDURE Main()
|
||||
gdImageGifAnimAdd(im, hFile, 0, 0, 0, 100, 1, NIL)
|
||||
gdImageGifAnimAdd(im, IMAGES_OUT + "anim2.gif", 0, 0, 0, 100, 1, NIL)
|
||||
/* construct the second frame */
|
||||
im2 = gdImageCreate(100, 100)
|
||||
im2 := gdImageCreate(100, 100)
|
||||
/* Allocate background to make it white */
|
||||
gdImageColorAllocate(im2, 255, 255, 255)
|
||||
/* Make sure the palette is identical */
|
||||
@@ -66,7 +66,7 @@ PROCEDURE Main()
|
||||
gdImageGifAnimAdd(im2, hFile, 0, 0, 0, 100, 1, im)
|
||||
gdImageGifAnimAdd(im2, IMAGES_OUT + "anim2.gif", 0, 0, 0, 100, 1, im)
|
||||
/* construct the second frame */
|
||||
im3 = gdImageCreate(100, 100)
|
||||
im3 := gdImageCreate(100, 100)
|
||||
/* Allocate background to make it white */
|
||||
gdImageColorAllocate(im3, 255, 255, 255)
|
||||
/* Make sure the palette is identical */
|
||||
|
||||
@@ -37,22 +37,22 @@ PROCEDURE Main()
|
||||
? gdVersion()
|
||||
|
||||
/* Create an image in memory */
|
||||
im = gdImageCreate(200, 200)
|
||||
im := gdImageCreate(200, 200)
|
||||
|
||||
/* Load an image in memory from file */
|
||||
im2 = gdImageCreateFromJpeg( IMAGES_IN + "conv_test.jpg")
|
||||
im2 := gdImageCreateFromJpeg( IMAGES_IN + "conv_test.jpg")
|
||||
|
||||
/* Now work on first empty image */
|
||||
|
||||
/* Allocate background */
|
||||
white = gdImageColorAllocate(im, 255, 255, 255)
|
||||
white := gdImageColorAllocate(im, 255, 255, 255)
|
||||
|
||||
/* Allocate drawing color */
|
||||
black = gdImageColorAllocate(im, 0, 0, 0)
|
||||
blue = gdImageColorAllocate(im, 0, 0, 255)
|
||||
red = gdImageColorAllocate(im, 255, 0, 0)
|
||||
green = gdImageColorAllocate(im, 0, 255, 0)
|
||||
cyan = gdImageColorAllocate(im, 0, 255, 255)
|
||||
black := gdImageColorAllocate(im, 0, 0, 0)
|
||||
blue := gdImageColorAllocate(im, 0, 0, 255)
|
||||
red := gdImageColorAllocate(im, 255, 0, 0)
|
||||
green := gdImageColorAllocate(im, 0, 255, 0)
|
||||
cyan := gdImageColorAllocate(im, 0, 255, 255)
|
||||
|
||||
/* Draw rectangle */
|
||||
gdImageFilledRectangle(im, 0, 0, 199, 199, cyan)
|
||||
|
||||
@@ -67,11 +67,11 @@ PROCEDURE Main(...)
|
||||
//DEFAULT cText TO "Testo di Prova"
|
||||
DEFAULT nPt TO 30
|
||||
|
||||
IF cImg <> NIL
|
||||
IF cImg != NIL
|
||||
//OutJpg( cImg, nPt )
|
||||
OutPhoto( cImg, nWidth, nHeight )
|
||||
|
||||
ELSEIF cPhoto <> NIL
|
||||
ELSEIF cPhoto != NIL
|
||||
StartHTML()
|
||||
//OutHTML ValToPrg( hParams ) + "<br>"
|
||||
//OutHTML ValToPrg( cParams ) + "<br>"
|
||||
@@ -83,8 +83,8 @@ PROCEDURE Main(...)
|
||||
OutHTML "</td></tr>"
|
||||
OutHTML "<tr><td align='center'>"
|
||||
OutHTML "<img src='test_out.exe?img=" + cPhoto + ;
|
||||
IIF( nWidth <> NIL , "&width=" + AllTrim( Str( nWidth ) ) , "" ) + ;
|
||||
IIF( nHeight <> NIL, "&height=" + AllTrim( Str( nHeight ) ), "" ) + ;
|
||||
IIF( nWidth != NIL , "&width=" + AllTrim( Str( nWidth ) ) , "" ) + ;
|
||||
IIF( nHeight != NIL, "&height=" + AllTrim( Str( nHeight ) ), "" ) + ;
|
||||
"'>" + "<br>"
|
||||
OutHTML "</td></tr>"
|
||||
OutHTML "<tr><td align='center'>"
|
||||
@@ -130,12 +130,12 @@ PROCEDURE OutPhoto( cPhoto, nWidth, nHeight )
|
||||
|
||||
LOCAL oImage := GDImage():LoadFromFile( cPhoto )
|
||||
|
||||
IF nWidth <> NIL .AND. nHeight <> NIL
|
||||
IF nWidth != NIL .AND. nHeight != NIL
|
||||
oImage:Resize( nWidth, nHeight )
|
||||
ELSEIF nWidth <> NIL .AND. nHeight == NIL
|
||||
ELSEIF nWidth != NIL .AND. nHeight == NIL
|
||||
nHeight := oImage:Height() * ( nWidth / oImage:Width() )
|
||||
oImage:Resize( nWidth, nHeight )
|
||||
ELSEIF nWidth == NIL .AND. nHeight <> NIL
|
||||
ELSEIF nWidth == NIL .AND. nHeight != NIL
|
||||
nWidth := oImage:Width() * ( nHeight / oImage:Height() )
|
||||
oImage:Resize( nWidth, nHeight )
|
||||
ENDIF
|
||||
|
||||
@@ -77,7 +77,7 @@ ENDCLASS
|
||||
METHOD New( oContainer ) CLASS HBButton
|
||||
::Container := oContainer
|
||||
|
||||
::hWnd = hb_GtkButtonCreate( oContainer:hWnd, ::GetNewID() )
|
||||
::hWnd := hb_GtkButtonCreate( oContainer:hWnd, ::GetNewID() )
|
||||
|
||||
::XSize := 80
|
||||
::YSize := 25
|
||||
|
||||
@@ -126,7 +126,7 @@ METHOD CtrlCommand( nCmd, nID, aEventData ) CLASS HBForm
|
||||
LOCAL nAt, oControl
|
||||
|
||||
IF ( nAt := AScan( ::aControls, { | o | o:nID == nID } ) ) != 0
|
||||
oControl = ::aControls[ nAt ]
|
||||
oControl := ::aControls[ nAt ]
|
||||
IF oControl:OnClick != nil
|
||||
__ObjSendMsg( Self, oControl:OnClick, oControl )
|
||||
ENDIF
|
||||
|
||||
@@ -109,7 +109,7 @@ METHOD Add( oMenuItem ) CLASS HGFMenuItem
|
||||
|
||||
::nHandle := nHandle
|
||||
|
||||
oMenuItem:oParent = Self
|
||||
oMenuItem:oParent := Self
|
||||
AAdd( ::Items, oMenuItem )
|
||||
RETURN nil
|
||||
|
||||
@@ -118,7 +118,7 @@ RETURN nil
|
||||
METHOD FindItem( nId ) CLASS HGFMenuItem
|
||||
LOCAL oMenuItem, n
|
||||
|
||||
FOR n = 1 TO Len( ::Items )
|
||||
FOR n := 1 TO Len( ::Items )
|
||||
IF ( oMenuItem := ::Items[ n ] ):nId == nId
|
||||
RETURN oMenuItem
|
||||
ELSE
|
||||
|
||||
@@ -109,7 +109,7 @@ ENDCLASS
|
||||
|
||||
ACCESS Top() CLASS HBWinControl
|
||||
LOCAL PosY := hb_GtkWidgetGetGeometry( ::hWnd, 1 )
|
||||
IF PosY <> HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
IF PosY != HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
::YPos := PosY
|
||||
ENDIF
|
||||
RETURN ::YPos
|
||||
@@ -118,7 +118,7 @@ RETURN ::YPos
|
||||
|
||||
ACCESS Left() CLASS HBWinControl
|
||||
LOCAL PosX := hb_GtkWidgetGetGeometry( ::hWnd, 2 )
|
||||
IF PosX <> HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
IF PosX != HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
::XPos := PosX
|
||||
ENDIF
|
||||
RETURN ::XPos
|
||||
@@ -127,7 +127,7 @@ RETURN ::XPos
|
||||
|
||||
ACCESS Height() CLASS HBWinControl
|
||||
LOCAL SizeY := hb_GtkWidgetGetGeometry( ::hWnd, 3 )
|
||||
IF SizeY <> HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
IF SizeY != HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
::YSize := SizeY
|
||||
ENDIF
|
||||
RETURN ::YSize
|
||||
@@ -136,7 +136,7 @@ RETURN ::YSize
|
||||
|
||||
ACCESS Width() CLASS HBWinControl
|
||||
LOCAL SizeX := hb_GtkWidgetGetGeometry( ::hWnd, 4 )
|
||||
IF SizeX <> HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
IF SizeX != HGF_GTK_WIDGET_GEOMETRY_UNKNOWN
|
||||
::XSize := SizeX
|
||||
ENDIF
|
||||
RETURN ::XSize
|
||||
|
||||
@@ -72,7 +72,7 @@ ENDCLASS
|
||||
|
||||
METHOD New( oContainer ) CLASS HBButton
|
||||
|
||||
::hWnd = WinCreateWindow(oContainer:hWndClient,; /* Parent window */
|
||||
::hWnd := WinCreateWindow(oContainer:hWndClient,; /* Parent window */
|
||||
WC_BUTTON,; /* Class window */
|
||||
"",; /* Button text */
|
||||
WS_VISIBLE + WS_TABSTOP+; /* Visible style */
|
||||
@@ -87,7 +87,7 @@ METHOD New( oContainer ) CLASS HBButton
|
||||
|
||||
// NOTE: There is no need to modify it later since I can give it an initial
|
||||
// size during window creartion
|
||||
//::Width = 80
|
||||
//::Height = 25
|
||||
//::Width := 80
|
||||
//::Height := 25
|
||||
|
||||
return Self
|
||||
|
||||
@@ -64,7 +64,7 @@ ENDCLASS
|
||||
|
||||
METHOD New( oContainer ) CLASS HBEdit
|
||||
|
||||
::hWnd = WinCreateWindow(oContainer:hWndClient,; /* Parent window */
|
||||
::hWnd := WinCreateWindow(oContainer:hWndClient,; /* Parent window */
|
||||
WC_ENTRYFIELD,; /* Class window */
|
||||
"",; /* Button text */
|
||||
WS_VISIBLE + WS_TABSTOP+; /* Visible style */
|
||||
@@ -77,7 +77,7 @@ METHOD New( oContainer ) CLASS HBEdit
|
||||
nil,; /* Control data */
|
||||
nil) /* parameters */
|
||||
|
||||
//::Width = 121
|
||||
//::Height = 21
|
||||
//::Width := 121
|
||||
//::Height := 21
|
||||
|
||||
return Self
|
||||
|
||||
@@ -98,12 +98,12 @@ METHOD New() CLASS HBForm
|
||||
// Notice that this code may be moved to a method Register()
|
||||
// so we hide again the OS API details
|
||||
WinRegisterClass("HB_HBForm", CS_SIZEREDRAW, 0, 0 )
|
||||
::lRegistered = .t.
|
||||
::lRegistered := .t.
|
||||
endif
|
||||
|
||||
// Again this code may be moved to a method Create() to hide the
|
||||
// OS API details
|
||||
::hWnd = WinCreateStdWindow( HWND_DESKTOP,;
|
||||
::hWnd := WinCreateStdWindow( HWND_DESKTOP,;
|
||||
WS_VISIBLE,;
|
||||
(FCF_TITLEBAR + FCF_SYSMENU +;
|
||||
FCF_SIZEBORDER + FCF_TASKLIST +;
|
||||
@@ -135,9 +135,9 @@ METHOD Command( nNotifyCode, nId, hWndCtl ) CLASS HBForm
|
||||
endif
|
||||
|
||||
case nNotifyCode == CMDSRC_PUSHBUTTON
|
||||
nAt = AScan( ::aControls, { | o | o:nId == nId } )
|
||||
nAt := AScan( ::aControls, { | o | o:nId == nId } )
|
||||
if nAt != 0
|
||||
oControl = ::aControls[ nAt ]
|
||||
oControl := ::aControls[ nAt ]
|
||||
if oControl:OnClick != nil
|
||||
__ObjSendMsg( Self, oControl:OnClick, oControl )
|
||||
endif
|
||||
@@ -230,7 +230,7 @@ function HB_GUI( hWnd, nMsg, nParam1, nParam2 ) // messages entry point
|
||||
local nForm := AScan( aForms, { | oForm | oForm:hWndClient == hWnd } )
|
||||
|
||||
if nForm != 0
|
||||
aReturn[ 1 ] = aForms[ nForm ]:HandleEvent( nMsg, nParam1, nParam2 )
|
||||
aReturn[ 1 ] := aForms[ nForm ]:HandleEvent( nMsg, nParam1, nParam2 )
|
||||
endif
|
||||
|
||||
return aReturn
|
||||
|
||||
@@ -74,7 +74,7 @@ METHOD New( oForm ) CLASS HBMenu
|
||||
::Items := {}
|
||||
|
||||
if oForm != nil
|
||||
::nHandle = WinCreateMenu( oForm:hWnd )
|
||||
::nHandle := WinCreateMenu( oForm:hWnd )
|
||||
endif
|
||||
|
||||
return Self
|
||||
@@ -94,7 +94,7 @@ METHOD FindItem( nId ) CLASS HBMenu
|
||||
|
||||
local oMenuItem, n
|
||||
|
||||
for n = 1 to Len( ::Items )
|
||||
for n := 1 to Len( ::Items )
|
||||
if ( oMenuItem := ::Items[ n ] ):nId == nId
|
||||
return oMenuItem
|
||||
else
|
||||
|
||||
@@ -82,11 +82,11 @@ METHOD New( oOwner ) CLASS HGFMenuItem
|
||||
|
||||
DEFAULT ::nIdStart TO 110
|
||||
|
||||
::Caption = ""
|
||||
::nId = ::nIdStart++
|
||||
::Enabled = .t.
|
||||
::oParent = oOwner
|
||||
::nHandle = nil
|
||||
::Caption := ""
|
||||
::nId := ::nIdStart++
|
||||
::Enabled := .t.
|
||||
::oParent := oOwner
|
||||
::nHandle := nil
|
||||
|
||||
return Self
|
||||
|
||||
@@ -113,7 +113,7 @@ METHOD FindItem( nId ) CLASS HGFMenuItem
|
||||
|
||||
local oMenuItem, n
|
||||
|
||||
for n = 1 to Len( ::Items )
|
||||
for n := 1 to Len( ::Items )
|
||||
if ( oMenuItem := ::Items[ n ] ):nId == nId
|
||||
return oMenuItem
|
||||
else
|
||||
|
||||
@@ -9,7 +9,7 @@ function Main()
|
||||
|
||||
local oForm2 := HBForm2():New()
|
||||
|
||||
oForm2:OnClick = "Form2Click"
|
||||
oForm2:OnClick := "Form2Click"
|
||||
|
||||
oForm2:ShowModal()
|
||||
|
||||
@@ -32,23 +32,23 @@ METHOD New() CLASS HBForm2
|
||||
|
||||
Super:New()
|
||||
|
||||
::Caption = "Harbour GUI demo"
|
||||
::Caption := "Harbour GUI demo"
|
||||
|
||||
oMenu = HBMenu():New( Self )
|
||||
oMenu := HBMenu():New( Self )
|
||||
|
||||
oMenuItem = HGFMenuItem():New( oMenu )
|
||||
oMenuitem:Caption = "View as Text"
|
||||
oMenuitem:Name = "ViewAsText"
|
||||
oMenuItem:OnClick = "ViewAsTextClick" // The container method to execute
|
||||
oMenuItem := HGFMenuItem():New( oMenu )
|
||||
oMenuitem:Caption := "View as Text"
|
||||
oMenuitem:Name := "ViewAsText"
|
||||
oMenuItem:OnClick := "ViewAsTextClick" // The container method to execute
|
||||
oMenu:Add( oMenuItem )
|
||||
|
||||
oMenuItem = HGFMenuItem():New( oMenu )
|
||||
oMenuitem:Caption = "Exit"
|
||||
oMenuitem:Name = "Exit"
|
||||
oMenuItem:OnClick = "ExitClick" // The container method to execute
|
||||
oMenuItem := HGFMenuItem():New( oMenu )
|
||||
oMenuitem:Caption := "Exit"
|
||||
oMenuitem:Name := "Exit"
|
||||
oMenuItem:OnClick := "ExitClick" // The container method to execute
|
||||
oMenu:Add( oMenuItem )
|
||||
|
||||
::Menu = oMenu
|
||||
::Menu := oMenu
|
||||
|
||||
return Self
|
||||
|
||||
|
||||
@@ -10,39 +10,39 @@ function Main()
|
||||
local oForm := HBFormControls():New()
|
||||
local oEdit, oBtn
|
||||
|
||||
oForm:Caption = "Harbour GUI Framework controls"
|
||||
oForm:Top = 175
|
||||
oForm:Left = 197
|
||||
oForm:Width = 382
|
||||
oForm:Height = 249
|
||||
oForm:Caption := "Harbour GUI Framework controls"
|
||||
oForm:Top := 175
|
||||
oForm:Left := 197
|
||||
oForm:Width := 382
|
||||
oForm:Height := 249
|
||||
|
||||
oEdit = HBEdit():New( oForm )
|
||||
oEdit:Top = 30
|
||||
oEdit:Left = 100
|
||||
oEdit:Width = 200
|
||||
oEdit:Caption = "Edit control"
|
||||
oEdit := HBEdit():New( oForm )
|
||||
oEdit:Top := 30
|
||||
oEdit:Left := 100
|
||||
oEdit:Width := 200
|
||||
oEdit:Caption := "Edit control"
|
||||
oForm:InsertControl( oEdit )
|
||||
|
||||
oBtn = HBButton():New( oForm )
|
||||
oBtn:Caption = "&View as text"
|
||||
oBtn:Top = 150
|
||||
oBtn:Left = 10
|
||||
oBtn:Width = 100
|
||||
oBtn:OnClick = "BtnViewAsTextClick"
|
||||
oBtn := HBButton():New( oForm )
|
||||
oBtn:Caption := "&View as text"
|
||||
oBtn:Top := 150
|
||||
oBtn:Left := 10
|
||||
oBtn:Width := 100
|
||||
oBtn:OnClick := "BtnViewAsTextClick"
|
||||
oForm:InsertControl( oBtn )
|
||||
|
||||
oBtn = HBButton():New( oForm )
|
||||
oBtn:Caption = "&Ok"
|
||||
oBtn:Top = 150
|
||||
oBtn:Left = 180
|
||||
oBtn:OnClick = "BtnOkClick"
|
||||
oBtn := HBButton():New( oForm )
|
||||
oBtn:Caption := "&Ok"
|
||||
oBtn:Top := 150
|
||||
oBtn:Left := 180
|
||||
oBtn:OnClick := "BtnOkClick"
|
||||
oForm:InsertControl( oBtn )
|
||||
|
||||
oBtn = HBButton():New( oForm )
|
||||
oBtn:Caption = "&Cancel"
|
||||
oBtn:Top = 150
|
||||
oBtn:Left = 280
|
||||
oBtn:OnClick = "BtnCancelClick"
|
||||
oBtn := HBButton():New( oForm )
|
||||
oBtn:Caption := "&Cancel"
|
||||
oBtn:Top := 150
|
||||
oBtn:Left := 280
|
||||
oBtn:OnClick := "BtnCancelClick"
|
||||
oForm:InsertControl( oBtn )
|
||||
|
||||
oForm:ShowModal()
|
||||
|
||||
@@ -10,37 +10,37 @@ function Main()
|
||||
local oMenu := HBMenu():New( oForm )
|
||||
local oMenuItem, oSubItem, oSubItem2
|
||||
|
||||
oMenuItem = HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption = "One"
|
||||
oMenuItem := HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption := "One"
|
||||
oMenu:Add( oMenuItem )
|
||||
|
||||
oSubItem = HGFMenuItem():New( oMenuItem )
|
||||
oSubItem:Caption = "First"
|
||||
oSubItem := HGFMenuItem():New( oMenuItem )
|
||||
oSubItem:Caption := "First"
|
||||
oMenuItem:Add( oSubItem )
|
||||
|
||||
oSubItem = HGFMenuItem():New( oMenuItem )
|
||||
oSubItem:Caption = "Second"
|
||||
oSubItem := HGFMenuItem():New( oMenuItem )
|
||||
oSubItem:Caption := "Second"
|
||||
oMenuItem:Add( oSubItem )
|
||||
|
||||
oSubItem2 = HGFMenuItem():New( oSubItem )
|
||||
oSubItem2:Caption = "Some"
|
||||
oSubItem2 := HGFMenuItem():New( oSubItem )
|
||||
oSubItem2:Caption := "Some"
|
||||
oSubItem:Add( oSubItem2 )
|
||||
|
||||
oSubItem2 = HGFMenuItem():New( oSubItem )
|
||||
oSubItem2:Caption = "More"
|
||||
oSubItem2 := HGFMenuItem():New( oSubItem )
|
||||
oSubItem2:Caption := "More"
|
||||
oSubItem:Add( oSubItem2 )
|
||||
|
||||
oMenuItem = HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption = "Two"
|
||||
oMenuItem := HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption := "Two"
|
||||
oMenu:Add( oMenuItem )
|
||||
|
||||
oMenuItem = HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption = "Three"
|
||||
oMenuItem := HGFMenuItem():New( oMenu )
|
||||
oMenuItem:Caption := "Three"
|
||||
oMenu:Add( oMenuItem )
|
||||
|
||||
oForm:Menu = oMenu
|
||||
oForm:Menu := oMenu
|
||||
|
||||
oForm:Caption = "Harbour GUI Framework"
|
||||
oForm:Caption := "Harbour GUI Framework"
|
||||
|
||||
oForm:ShowModal()
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ ENDCLASS
|
||||
|
||||
METHOD New( oContainer ) CLASS HBButton
|
||||
|
||||
::hWnd = WinCreateStdWindow( , nOr( WS_CHILD, WS_TABSTOP ),, "BUTTON", "",,;
|
||||
::hWnd := WinCreateStdWindow( , nOr( WS_CHILD, WS_TABSTOP ),, "BUTTON", "",,;
|
||||
oContainer:hWnd, ::GetNewId() )
|
||||
::Width = 80
|
||||
::Height = 25
|
||||
::Width := 80
|
||||
::Height := 25
|
||||
|
||||
return Self
|
||||
|
||||
@@ -63,9 +63,9 @@ ENDCLASS
|
||||
|
||||
METHOD New( oContainer ) CLASS HBEdit
|
||||
|
||||
::hWnd = WinCreateStdWindow( , nOr( WS_BORDER, WS_CHILD, WS_TABSTOP ),,;
|
||||
::hWnd := WinCreateStdWindow( , nOr( WS_BORDER, WS_CHILD, WS_TABSTOP ),,;
|
||||
"EDIT", "",, oContainer:hWnd, ::GetNewId() )
|
||||
::Width = 121
|
||||
::Height = 21
|
||||
::Width := 121
|
||||
::Height := 21
|
||||
|
||||
return Self
|
||||
|
||||
@@ -87,10 +87,10 @@ METHOD New() CLASS HBForm
|
||||
|
||||
if ! ::lRegistered
|
||||
WinRegisterClass( "HB_TFORM" )
|
||||
::lRegistered = .t.
|
||||
::lRegistered := .t.
|
||||
endif
|
||||
|
||||
::hWnd = WinCreateStdWindow( , nOr( WS_OVERLAPPEDWINDOW ),,;
|
||||
::hWnd := WinCreateStdWindow( , nOr( WS_OVERLAPPEDWINDOW ),,;
|
||||
"HB_TFORM", "Harbour TForm" )
|
||||
|
||||
AAdd( aForms, Self )
|
||||
@@ -109,9 +109,9 @@ METHOD Command( nNotifyCode, nId, hWndCtl ) CLASS HBForm
|
||||
endif
|
||||
endif
|
||||
else // Control command
|
||||
nAt = AScan( ::aControls, { | o | o:hWnd == hWndCtl } )
|
||||
nAt := AScan( ::aControls, { | o | o:hWnd == hWndCtl } )
|
||||
if nAt != 0
|
||||
oControl = ::aControls[ nAt ]
|
||||
oControl := ::aControls[ nAt ]
|
||||
if oControl:OnClick != nil
|
||||
__ObjSendMsg( Self, oControl:OnClick, oControl )
|
||||
endif
|
||||
@@ -165,7 +165,7 @@ return nil
|
||||
|
||||
ASSIGN Menu( oNewMenu ) CLASS HBForm
|
||||
|
||||
::oMainMenu = oNewMenu
|
||||
::oMainMenu := oNewMenu
|
||||
|
||||
SetMenu( ::hWnd, oNewMenu:nHandle )
|
||||
|
||||
@@ -178,7 +178,7 @@ function HB_GUI( hWnd, nMsg, nParam1, nParam2 ) // messages entry point
|
||||
static aReturn := { nil, nil }
|
||||
|
||||
if nForm != 0
|
||||
aReturn[ 1 ] = aForms[ nForm ]:HandleEvent( nMsg, nParam1, nParam2 )
|
||||
aReturn[ 1 ] := aForms[ nForm ]:HandleEvent( nMsg, nParam1, nParam2 )
|
||||
endif
|
||||
|
||||
return aReturn
|
||||
|
||||
@@ -67,10 +67,10 @@ ENDCLASS
|
||||
|
||||
METHOD New( oForm ) CLASS HBMenu
|
||||
|
||||
::Items = {}
|
||||
::Items := {}
|
||||
|
||||
if oForm != nil
|
||||
::nHandle = WinCreateMenu( oForm:hWnd )
|
||||
::nHandle := WinCreateMenu( oForm:hWnd )
|
||||
endif
|
||||
|
||||
return Self
|
||||
@@ -80,7 +80,7 @@ METHOD Add( oMenuItem ) CLASS HBMenu
|
||||
WinAddMenuItem( ::nHandle, oMenuItem:Caption, Len( ::Items ),;
|
||||
nil, oMenuItem:nId, oMenuItem:Enabled )
|
||||
|
||||
oMenuItem:oParent = Self
|
||||
oMenuItem:oParent := Self
|
||||
AAdd( ::Items, oMenuItem )
|
||||
|
||||
return nil
|
||||
@@ -89,7 +89,7 @@ METHOD FindItem( nId ) CLASS HBMenu
|
||||
|
||||
local oMenuItem, n
|
||||
|
||||
for n = 1 to Len( ::Items )
|
||||
for n := 1 to Len( ::Items )
|
||||
if ( oMenuItem := ::Items[ n ] ):nId == nId
|
||||
return oMenuItem
|
||||
else
|
||||
|
||||
@@ -78,10 +78,10 @@ METHOD New( oOwner ) CLASS HGFMenuItem
|
||||
|
||||
DEFAULT ::nIdStart TO 110
|
||||
|
||||
::Caption = ""
|
||||
::Enabled = .t.
|
||||
::nId = ::nIdStart++
|
||||
::oParent = oOwner
|
||||
::Caption := ""
|
||||
::Enabled := .t.
|
||||
::nId := ::nIdStart++
|
||||
::oParent := oOwner
|
||||
|
||||
return Self
|
||||
|
||||
@@ -93,7 +93,7 @@ METHOD Add( oMenuItem ) CLASS HGFMenuItem
|
||||
WinAddMenuItem( ::nHandle, oMenuItem:Caption, Len( ::Items ),;
|
||||
nil, oMenuItem:nId, oMenuItem:Enabled )
|
||||
|
||||
oMenuItem:oParent = Self
|
||||
oMenuItem:oParent := Self
|
||||
AAdd( ::Items, oMenuItem )
|
||||
|
||||
return nil
|
||||
@@ -102,7 +102,7 @@ METHOD FindItem( nId ) CLASS HGFMenuItem
|
||||
|
||||
local oMenuItem, n
|
||||
|
||||
for n = 1 to Len( ::Items )
|
||||
for n := 1 to Len( ::Items )
|
||||
if ( oMenuItem := ::Items[ n ] ):nId == nId
|
||||
return oMenuItem
|
||||
else
|
||||
|
||||
@@ -131,7 +131,7 @@ Function DesignHaruPDF( cFileToSave )
|
||||
HPDF_Page_Stroke( page )
|
||||
|
||||
/* Print the title of the page(with positioning center). */
|
||||
def_font = HPDF_GetFont( pdf, "Helvetica", NIL )
|
||||
def_font := HPDF_GetFont( pdf, "Helvetica", NIL )
|
||||
|
||||
HPDF_Page_SetFontAndSize( page, def_font, 24 )
|
||||
tw := HPDF_Page_TextWidth( page, page_title )
|
||||
@@ -210,7 +210,7 @@ Static Function Page_Lines( pdf )
|
||||
|
||||
/* print the title of the page(with positioning center). */
|
||||
HPDF_Page_SetFontAndSize(page, font, 24)
|
||||
tw = HPDF_Page_TextWidth(page, page_title)
|
||||
tw := HPDF_Page_TextWidth(page, page_title)
|
||||
HPDF_Page_BeginText(page)
|
||||
HPDF_Page_MoveTextPos(page,(HPDF_Page_GetWidth(page) - tw) / 2, ;
|
||||
HPDF_Page_GetHeight(page) - 50)
|
||||
@@ -475,7 +475,7 @@ Static Function Page_Text( pdf )
|
||||
Local angle1, angle2, rad1, rad2,i,x,y,buf
|
||||
|
||||
/* add a new page object. */
|
||||
page = HPDF_AddPage(pdf)
|
||||
page := HPDF_AddPage(pdf)
|
||||
HPDF_Page_SetSize(page, HPDF_PAGE_SIZE_A5, HPDF_PAGE_PORTRAIT)
|
||||
|
||||
//print_grid( pdf, page )
|
||||
@@ -687,10 +687,10 @@ Static Function Page_TextScaling( pdf )
|
||||
//HPDF_SetCompressionMode(pdf, HPDF_COMP_ALL)
|
||||
|
||||
/* create default-font */
|
||||
font = HPDF_GetFont(pdf, "Helvetica", NIL)
|
||||
font := HPDF_GetFont(pdf, "Helvetica", NIL)
|
||||
|
||||
/* add a new page object. */
|
||||
page = HPDF_AddPage(pdf)
|
||||
page := HPDF_AddPage(pdf)
|
||||
|
||||
/* draw grid to the page */
|
||||
//print_grid(pdf, page)
|
||||
@@ -704,7 +704,7 @@ Static Function Page_TextScaling( pdf )
|
||||
|
||||
/* print the title of the page(with positioning center). */
|
||||
HPDF_Page_SetFontAndSize(page, font, 24)
|
||||
tw = HPDF_Page_TextWidth(page, page_title)
|
||||
tw := HPDF_Page_TextWidth(page, page_title)
|
||||
HPDF_Page_BeginText(page)
|
||||
HPDF_Page_TextOut(page,(HPDF_Page_GetWidth(page) - tw) / 2,;
|
||||
HPDF_Page_GetHeight(page) - 50, page_title)
|
||||
@@ -771,7 +771,7 @@ Static Function Page_TextScaling( pdf )
|
||||
next
|
||||
HPDF_Page_MoveTextPos(page, 0, -25)
|
||||
|
||||
for i = 1 to len
|
||||
for i := 1 to len
|
||||
b := i /len
|
||||
g := 1 -(i /len)
|
||||
buf := substr( samp_text, i, 1 )
|
||||
@@ -867,10 +867,10 @@ Static Function Page_TextScaling( pdf )
|
||||
show_description(page, 320, ypos - 120, "Skewing text")
|
||||
HPDF_Page_BeginText(page)
|
||||
|
||||
angle1 = 10
|
||||
angle2 = 20
|
||||
rad1 = angle1 / 180 * 3.141592
|
||||
rad2 = angle2 / 180 * 3.141592
|
||||
angle1 := 10
|
||||
angle2 := 20
|
||||
rad1 := angle1 / 180 * 3.141592
|
||||
rad2 := angle2 / 180 * 3.141592
|
||||
|
||||
HPDF_Page_SetTextMatrix(page, 1, tan(rad1), tan(rad2), 1, 320, ypos - 120)
|
||||
HPDF_Page_ShowText(page, "ABCabc123")
|
||||
@@ -1006,17 +1006,17 @@ Static function Page_CodePages( pdf )
|
||||
font_name := HPDF_LoadType1FontFromFile(pdf, cAfm, cPfb )
|
||||
|
||||
/* create outline root. */
|
||||
root = HPDF_CreateOutline(pdf, NIL, "Encoding list", NIL)
|
||||
root := HPDF_CreateOutline(pdf, NIL, "Encoding list", NIL)
|
||||
HPDF_Outline_SetOpened(root, .t.)
|
||||
|
||||
for i := 1 to len( encodings )
|
||||
page = HPDF_AddPage(pdf)
|
||||
page := HPDF_AddPage(pdf)
|
||||
|
||||
HPDF_Page_SetWidth(page, PAGE_WIDTH)
|
||||
HPDF_Page_SetHeight(page, PAGE_HEIGHT)
|
||||
|
||||
outline = HPDF_CreateOutline(pdf, root, encodings[i], NIL)
|
||||
dst = HPDF_Page_CreateDestination(page)
|
||||
outline := HPDF_CreateOutline(pdf, root, encodings[i], NIL)
|
||||
dst := HPDF_Page_CreateDestination(page)
|
||||
HPDF_Destination_SetXYZ(dst, 0, HPDF_Page_GetHeight(page), 1)
|
||||
|
||||
/* HPDF_Destination_SetFitB(dst) */
|
||||
@@ -1033,11 +1033,11 @@ Static function Page_CodePages( pdf )
|
||||
HPDF_Page_EndText(page)
|
||||
|
||||
if (encodings[i] == "Symbol-Set")
|
||||
font2 = HPDF_GetFont(pdf, "Symbol", NIL)
|
||||
font2 := HPDF_GetFont(pdf, "Symbol", NIL)
|
||||
elseif (encodings[i] == "ZapfDingbats-Set")
|
||||
font2 = HPDF_GetFont(pdf, "ZapfDingbats", NIL)
|
||||
font2 := HPDF_GetFont(pdf, "ZapfDingbats", NIL)
|
||||
else
|
||||
font2 = HPDF_GetFont(pdf, font_name, encodings[i])
|
||||
font2 := HPDF_GetFont(pdf, font_name, encodings[i])
|
||||
endif
|
||||
|
||||
HPDF_Page_SetFontAndSize(page, font2, 14)
|
||||
@@ -1055,7 +1055,7 @@ static function draw_graph( page )
|
||||
HPDF_Page_SetLineWidth(page, 0.5)
|
||||
|
||||
for i := 0 to 17
|
||||
x = i * CELL_WIDTH + 40;
|
||||
x := i * CELL_WIDTH + 40;
|
||||
|
||||
HPDF_Page_MoveTo(page, x, PAGE_HEIGHT - 60)
|
||||
HPDF_Page_LineTo(page, x, 40)
|
||||
@@ -1096,8 +1096,8 @@ Static function draw_fonts(page)
|
||||
/* Draw all character from 0x20 to 0xFF to the canvas. */
|
||||
for i := 1 to 16
|
||||
for j := 1 to 16
|
||||
y = PAGE_HEIGHT - 55 - ((i - 1) * CELL_HEIGHT)
|
||||
x = j * CELL_WIDTH + 50
|
||||
y := PAGE_HEIGHT - 55 - ((i - 1) * CELL_HEIGHT)
|
||||
x := j * CELL_WIDTH + 50
|
||||
|
||||
buf := (i - 1) * 16 + (j - 1)
|
||||
if (buf >= 32)
|
||||
@@ -1188,9 +1188,9 @@ Static Function Page_Annotation( pdf )
|
||||
Local page, font, encoding, annot
|
||||
|
||||
/* use Times-Roman font. */
|
||||
font = HPDF_GetFont(pdf, "Times-Roman", "WinAnsiEncoding")
|
||||
font := HPDF_GetFont(pdf, "Times-Roman", "WinAnsiEncoding")
|
||||
|
||||
page = HPDF_AddPage(pdf)
|
||||
page := HPDF_AddPage(pdf)
|
||||
|
||||
HPDF_Page_SetWidth(page, 400)
|
||||
HPDF_Page_SetHeight(page, 500)
|
||||
@@ -1202,7 +1202,7 @@ Static Function Page_Annotation( pdf )
|
||||
HPDF_Page_EndText(page)
|
||||
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect1, ;
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect1, ;
|
||||
"Annotation with Comment Icons"+chr(13)+chr(10)+;
|
||||
"This annotation set to be opened initially.",;
|
||||
NIL)
|
||||
@@ -1210,25 +1210,25 @@ Static Function Page_Annotation( pdf )
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_COMMENT)
|
||||
HPDF_TextAnnot_SetOpened(annot, HPDF_TRUE)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect2, "Annotation with Key Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect2, "Annotation with Key Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_PARAGRAPH)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect3, "Annotation with Note Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect3, "Annotation with Note Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_NOTE)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect4, "Annotation with Help Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect4, "Annotation with Help Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_HELP)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect5, "Annotation with NewParagraph Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect5, "Annotation with NewParagraph Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_NEW_PARAGRAPH)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect6, "Annotation with Paragraph Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect6, "Annotation with Paragraph Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_PARAGRAPH)
|
||||
|
||||
annot = HPDF_Page_CreateTextAnnot(page, rect7, "Annotation with Insert Icon", NIL)
|
||||
annot := HPDF_Page_CreateTextAnnot(page, rect7, "Annotation with Insert Icon", NIL)
|
||||
HPDF_TextAnnot_SetIcon(annot, HPDF_ANNOT_ICON_INSERT)
|
||||
|
||||
encoding = HPDF_GetEncoder(pdf, "ISO8859-2")
|
||||
encoding := HPDF_GetEncoder(pdf, "ISO8859-2")
|
||||
|
||||
HPDF_Page_CreateTextAnnot(page, rect8,"Annotation with ISO8859 text ÓÔÕÖרÙ", encoding)
|
||||
|
||||
@@ -1314,7 +1314,7 @@ Static function Page_Images( pdf )
|
||||
/* image3 is a RGB-color image. we use this image for color-mask
|
||||
* demo.
|
||||
*/
|
||||
image3 = HPDF_LoadPngImageFromFile(pdf, cImagePath+"maskimage.png")
|
||||
image3 := HPDF_LoadPngImageFromFile(pdf, cImagePath+"maskimage.png")
|
||||
|
||||
iw := HPDF_Image_GetWidth(image)
|
||||
ih := HPDF_Image_GetHeight(image)
|
||||
@@ -1360,8 +1360,8 @@ Static function Page_Images( pdf )
|
||||
x += 150
|
||||
|
||||
/* Rotating image */
|
||||
angle = 30 /* rotation of 30 degrees. */
|
||||
rad = angle / 180 * 3.141592 /* Calcurate the radian value. */
|
||||
angle := 30 /* rotation of 30 degrees. */
|
||||
rad := angle / 180 * 3.141592 /* Calcurate the radian value. */
|
||||
|
||||
HPDF_Page_GSave(page)
|
||||
HPDF_Page_Concat(page, iw * cos(rad), ;
|
||||
|
||||
@@ -132,7 +132,7 @@ procedure main(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11)
|
||||
quit
|
||||
endif
|
||||
|
||||
while !dbffile->(eof()) .AND. Inkey() <> 27
|
||||
while !dbffile->(eof()) .AND. Inkey() != 27
|
||||
|
||||
oRecord := oTable:GetBlankRow()
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ METHOD GetRow(nRow) CLASS TmSQLQuery
|
||||
|
||||
default nRow to 0
|
||||
|
||||
if ::nResultHandle <> NIL
|
||||
if ::nResultHandle != NIL
|
||||
if nRow >= 1 .AND. nRow <= ::nNumRows
|
||||
|
||||
// NOTE: row count starts from 0
|
||||
@@ -292,7 +292,7 @@ METHOD GetRow(nRow) CLASS TmSQLQuery
|
||||
|
||||
aRow := msqlFetchR(::nResultHandle, ::nNumFields)
|
||||
|
||||
if aRow <> NIL
|
||||
if aRow != NIL
|
||||
|
||||
if ::lRowID
|
||||
aRow[1] := Val(aRow[1])
|
||||
@@ -412,7 +412,7 @@ METHOD GetRow(nRow) CLASS TmSQLTable
|
||||
|
||||
local oRow := super:GetRow(nRow)
|
||||
|
||||
if oRow <> NIL
|
||||
if oRow != NIL
|
||||
oRow:cTable := ::cTable
|
||||
endif
|
||||
|
||||
@@ -743,9 +743,10 @@ METHOD Query(cQuery) CLASS TmSQLServer
|
||||
i := 1
|
||||
nNumTables := 0
|
||||
|
||||
while __StrToken(cUpperQuery, i++, " ") <> "FROM"
|
||||
while !( __StrToken(cUpperQuery, i++, " ") == "FROM" )
|
||||
enddo
|
||||
while (cToken := __StrToken(cUpperQuery, i++, " ")) <> "WHERE" .AND. cToken <> "LIMIT" .AND. !Empty(cToken)
|
||||
|
||||
while !( (cToken := __StrToken(cUpperQuery, i++, " ")) == "WHERE" ) .AND. !( cToken == "LIMIT" ) .AND. !Empty(cToken)
|
||||
cTableName := __StrToken(cQuery, i - 1, " ")
|
||||
nNumTables++
|
||||
enddo
|
||||
|
||||
@@ -146,7 +146,7 @@ procedure main(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14)
|
||||
quit
|
||||
endif
|
||||
|
||||
while !dbffile->(eof()) .AND. Inkey() <> K_ESC
|
||||
while !dbffile->(eof()) .AND. Inkey() != K_ESC
|
||||
|
||||
oRecord := oTable:GetBlankRow()
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ METHOD GetRow(nRow) CLASS TMySQLQuery
|
||||
//DAVID: use current row default nRow to 0
|
||||
default nRow to ::nCurRow
|
||||
|
||||
if ::nResultHandle <> NIL
|
||||
if ::nResultHandle != NIL
|
||||
|
||||
//DAVID:
|
||||
::lBof := ( EMPTY( ::LastRec() ) )
|
||||
@@ -533,7 +533,7 @@ METHOD GetRow(nRow) CLASS TMySQLQuery
|
||||
::aRow := sqlFetchR(::nResultHandle)
|
||||
endif
|
||||
|
||||
if ::aRow <> NIL
|
||||
if ::aRow != NIL
|
||||
|
||||
// Convert answer from text field to correct clipper types
|
||||
for i := 1 to ::nNumFields
|
||||
@@ -810,7 +810,7 @@ METHOD GetRow(nRow) CLASS TMySQLTable
|
||||
|
||||
local oRow := super:GetRow(nRow),i := 0
|
||||
|
||||
if oRow <> NIL
|
||||
if oRow != NIL
|
||||
oRow:cTable := ::cTable
|
||||
endif
|
||||
|
||||
@@ -857,7 +857,7 @@ METHOD Update(oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
|
||||
|
||||
for i := 1 to ::nNumFields
|
||||
|
||||
if ::aOldValue[i]<>::FieldGet(i)
|
||||
if !( ::aOldValue[i] == ::FieldGet(i) )
|
||||
cUpdateQuery += ::aFieldStruct[i][MYSQL_FS_NAME] + "=" + ClipValue2SQL(::FieldGet(i)) + ","
|
||||
endif
|
||||
next
|
||||
@@ -906,7 +906,7 @@ METHOD Update(oRow, lOldRecord, lRefresh ) CLASS TMySQLTable
|
||||
|
||||
endif
|
||||
|
||||
Case oRow<>nil
|
||||
Case oRow!=nil
|
||||
|
||||
if oRow:cTable == ::cTable
|
||||
|
||||
@@ -1021,7 +1021,7 @@ METHOD Delete(oRow, lOldRecord, lRefresh) CLASS TMySQLTable
|
||||
|
||||
endif
|
||||
|
||||
Case oRow<>nil
|
||||
Case oRow!=nil
|
||||
if oRow:cTable == ::cTable
|
||||
|
||||
//DAVID:
|
||||
@@ -1078,7 +1078,7 @@ METHOD Append(oRow, lRefresh) CLASS TMySQLTable
|
||||
|
||||
// field names
|
||||
for i := 1 to ::nNumFields
|
||||
if ::aFieldStruct[i][MYSQL_FS_FLAGS]<>AUTO_INCREMENT_FLAG
|
||||
if ::aFieldStruct[i][MYSQL_FS_FLAGS]!=AUTO_INCREMENT_FLAG
|
||||
cInsertQuery += ::aFieldStruct[i][MYSQL_FS_NAME] + ","
|
||||
endif
|
||||
next
|
||||
@@ -1087,7 +1087,7 @@ METHOD Append(oRow, lRefresh) CLASS TMySQLTable
|
||||
|
||||
// field values
|
||||
for i := 1 to ::nNumFields
|
||||
if ::aFieldStruct[i][MYSQL_FS_FLAGS]<>AUTO_INCREMENT_FLAG
|
||||
if ::aFieldStruct[i][MYSQL_FS_FLAGS]!=AUTO_INCREMENT_FLAG
|
||||
cInsertQuery += ClipValue2SQL(::FieldGet(i)) + ","
|
||||
endif
|
||||
next
|
||||
@@ -1117,13 +1117,13 @@ METHOD Append(oRow, lRefresh) CLASS TMySQLTable
|
||||
::lError := .T.
|
||||
endif
|
||||
|
||||
Case oRow<>nil
|
||||
Case oRow!=nil
|
||||
|
||||
if oRow:cTable == ::cTable
|
||||
|
||||
// field names
|
||||
for i := 1 to Len(oRow:aRow)
|
||||
if oRow:aFieldStruct[i][MYSQL_FS_FLAGS]<>AUTO_INCREMENT_FLAG
|
||||
if oRow:aFieldStruct[i][MYSQL_FS_FLAGS]!=AUTO_INCREMENT_FLAG
|
||||
cInsertQuery += oRow:aFieldStruct[i][MYSQL_FS_NAME] + ","
|
||||
endif
|
||||
next
|
||||
@@ -1132,7 +1132,7 @@ METHOD Append(oRow, lRefresh) CLASS TMySQLTable
|
||||
|
||||
// field values
|
||||
for i := 1 to Len(oRow:aRow)
|
||||
if oRow:aFieldStruct[i][MYSQL_FS_FLAGS]<>AUTO_INCREMENT_FLAG
|
||||
if oRow:aFieldStruct[i][MYSQL_FS_FLAGS]!=AUTO_INCREMENT_FLAG
|
||||
cInsertQuery += ClipValue2SQL(oRow:aRow[i]) + ","
|
||||
endif
|
||||
next
|
||||
@@ -1591,14 +1591,14 @@ METHOD Query(cQuery) CLASS TMySQLServer
|
||||
i := 1
|
||||
nNumTables := 1
|
||||
|
||||
while (cToken := __StrToken(cUpperQuery, i++, " ")) <> "FROM" .AND. !Empty(cToken)
|
||||
while !( (cToken := __StrToken(cUpperQuery, i++, " ")) == "FROM" ) .AND. !Empty(cToken)
|
||||
enddo
|
||||
|
||||
// first token after "FROM" is a table name
|
||||
// NOTE: SubSelects ?
|
||||
cTableName := __StrToken(cUpperQuery, i++, " ")
|
||||
|
||||
while (cToken := __StrToken(cUpperQuery, i++, " ")) <> "WHERE" .AND. !Empty(cToken)
|
||||
while !( (cToken := __StrToken(cUpperQuery, i++, " ")) == "WHERE" ) .AND. !Empty(cToken)
|
||||
// do we have more than one table referenced ?
|
||||
if cToken == "," .OR. cToken == "JOIN"
|
||||
nNumTables++
|
||||
|
||||
@@ -182,7 +182,7 @@ METHOD New(nTop, nLeft, nBottom, nRight, oServer, oQuery, cTable) CLASS TBrowseS
|
||||
// No bBlock now since New() would use it to find column length, but column is not ready yet at this point
|
||||
oCol := TBColumnSQL():New(::oCurRow:FieldName(i),, Self)
|
||||
|
||||
if ::oCurRow:FieldType(i) <> "M"
|
||||
if !( ::oCurRow:FieldType(i) == "M" )
|
||||
oCol:Width := Max(::oCurRow:FieldLen(i), Len(oCol:Heading))
|
||||
else
|
||||
oCol:Width := 10
|
||||
|
||||
@@ -83,7 +83,7 @@ PROC MyZip( ... )
|
||||
FOR EACH cWild IN aWild
|
||||
IF !EMPTY( cWild )
|
||||
aDir := DIRECTORY( cWild )
|
||||
cPath = LEFT( cWild, RAT( HB_OSPATHSEPARATOR(), cWild ) )
|
||||
cPath := LEFT( cWild, RAT( HB_OSPATHSEPARATOR(), cWild ) )
|
||||
FOR EACH aFile IN aDir
|
||||
IF cPath + aFile[ 1 ] != cFileName
|
||||
? "Adding", cPath + aFile[ 1 ]
|
||||
|
||||
@@ -282,7 +282,7 @@ FUNCTION FT_ArEdit( nTop, nLeft, nBot, nRight, ;
|
||||
|
||||
* Other exception handling ...
|
||||
CASE VALTYPE(bGetFunc) == "B"
|
||||
IF nKey <> K_ENTER
|
||||
IF nKey != K_ENTER
|
||||
* want last key to be part of GET edit so KEYBOARD it
|
||||
KEYBOARD CHR(LASTKEY())
|
||||
ENDIF
|
||||
|
||||
@@ -126,9 +126,9 @@ FUNCTION FT_CALENDAR (nRow, nCol, cColor, lShadow, lShowHelp)
|
||||
LOCAL aRetVal[8]
|
||||
LOCAL nHelpRow, cSaveHelp, lHelpIsDisplayed :=.F.
|
||||
|
||||
nRow := IIF ( nRow <> NIL, nRow, 1 ) //check display row
|
||||
nCol := IIF ( nCol <> NIL, nCol, 63) //check display col
|
||||
cColor := IIF ( cColor <> NIL, cColor, 'W+/G' ) //check display color
|
||||
nRow := IIF ( nRow != NIL, nRow, 1 ) //check display row
|
||||
nCol := IIF ( nCol != NIL, nCol, 63) //check display col
|
||||
cColor := IIF ( cColor != NIL, cColor, 'W+/G' ) //check display color
|
||||
lShadow := IIF ( lShadow == NIL , .F., lShadow ) //check shadow switch
|
||||
lShowHelp := IIF ( lShowHelp == NIL , .F., lShowHelp )//check help switch
|
||||
|
||||
@@ -148,7 +148,7 @@ FUNCTION FT_CALENDAR (nRow, nCol, cColor, lShadow, lShowHelp)
|
||||
nHelpRow := IIF (nRow > 10 , nRow - 10 , nRow + 6 )
|
||||
ENDIF
|
||||
|
||||
DO WHILE nKey <> K_ESC
|
||||
DO WHILE nKey != K_ESC
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_HOME
|
||||
|
||||
@@ -305,10 +305,10 @@ SETCOLOR( IIF( lColour, "N/W,W+/R", "N/W,W+/N" ) )
|
||||
ClearS( nT, nL, nB, nR )
|
||||
|
||||
*.... prompt for colour setting and modify
|
||||
DO WHILE nChoice <> 0
|
||||
DO WHILE nChoice != 0
|
||||
Double( nT, nL+1, nB, nR-1 )
|
||||
nChoice := aChoice( nt+1, nL+2, nB-1, nR-2, aPrompt, , , nChoice )
|
||||
IF nChoice <> 0
|
||||
IF nChoice != 0
|
||||
_ftHiLite( ROW(), nL+2, aPrompt[ nChoice ], nLen )
|
||||
Single( nT, nL+1, nB, nR-1 )
|
||||
aClrs[ nChoice ] := _ftColours( aClrs[ nChoice ], aClrPal, lColour )
|
||||
@@ -379,7 +379,7 @@ DO CASE
|
||||
aPrompt := { " Standard ", " Selected ", " Border ", " Unselected " }
|
||||
ENDCASE
|
||||
|
||||
IF aOpt[ C_TYPE ] <> "T" // no prompt for titles
|
||||
IF !( aOpt[ C_TYPE ] == "T" ) // no prompt for titles
|
||||
*.... we need to know top,left,bottom,right for the prompt window
|
||||
aEval( aPrompt, { |cPrompt| nLen := MAX( nLen, LEN( cPrompt ) ) } )
|
||||
nLen := MAX( nLen, LEN( aOpt[ C_NAME ] ) + 2 )
|
||||
@@ -398,7 +398,7 @@ DO WHILE .T.
|
||||
*.... show sample window
|
||||
_ftShowIt( aOpt )
|
||||
|
||||
IF aOpt[ C_TYPE ] <> "T" // no prompt for titles
|
||||
IF !( aOpt[ C_TYPE ] == "T" ) // no prompt for titles
|
||||
SETCOLOR( IIF( lColour, "N/W,W+/R,,,N/W", "N/W,W+/N,,,N/W" ) )
|
||||
Double( nT, nL+1, nB, nR-1 )
|
||||
@ nT, nL+2 SAY PadC( " "+ aOpt[C_NAME] +" ", nR -nL -3, "Í" )
|
||||
@@ -414,7 +414,7 @@ DO WHILE .T.
|
||||
*.... desktop character
|
||||
aOpt := _ftDeskChar( aOpt )
|
||||
LOOP
|
||||
CASE nChoice == 4 .AND. aOpt[ C_TYPE ] <> "M"
|
||||
CASE nChoice == 4 .AND. !( aOpt[ C_TYPE ] == "M" )
|
||||
nChoice := 5 // 4th color param is unused
|
||||
ENDCASE
|
||||
ENDIF
|
||||
@@ -432,7 +432,7 @@ DO WHILE .T.
|
||||
cClr := aClrs[ nChoice ] // selected colour
|
||||
|
||||
*.... allow change to specific part of colour string
|
||||
IF aOpt[ C_TYPE ] <> "T"
|
||||
IF !( aOpt[ C_TYPE ] == "T" )
|
||||
Single( nT, nL+1, nB, nR-1 )
|
||||
@ nT, nL+2 SAY PadC( " "+ aOpt[C_NAME] +" ", nR -nL -3, "Ä" )
|
||||
ENDIF
|
||||
@@ -459,7 +459,7 @@ STATIC FUNCTION _ftShowIt( aOpt )
|
||||
|
||||
LOCAL aClr := _ftChr2Arr( aOpt[ C_CLR ] )
|
||||
|
||||
IF aOpt[ C_TYPE ] <> "M" // no borders in menu colour selection
|
||||
IF !( aOpt[ C_TYPE ] == "M" ) // no borders in menu colour selection
|
||||
SETCOLOR( aOpt[ C_CLR ] ) // this will set the border on VGA
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -101,11 +101,11 @@ FUNCTION FT_PENDING (cMsg, nRow, nCol, nWait, cColor)
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
nRow1 := IIF( nRow <> NIL, nRow, nRow1 ) //reset display row
|
||||
nCol1 := IIF( nCol <> NIL, nCol, nCol1 ) //reset display col
|
||||
nRow1 := IIF( nRow != NIL, nRow, nRow1 ) //reset display row
|
||||
nCol1 := IIF( nCol != NIL, nCol, nCol1 ) //reset display col
|
||||
|
||||
nWait1 := IIF ( nWait <> NIL, nWait, nWait1) //reset display wait
|
||||
cColor1 := IIF (cColor <> NIL, cColor, cColor1) //reset display color
|
||||
nWait1 := IIF( nWait != NIL, nWait, nWait1) //reset display wait
|
||||
cColor1 := IIF( cColor != NIL, cColor, cColor1) //reset display color
|
||||
|
||||
nThis_Time := SECONDS() //time of current message
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ function ft_sqzn(nValue,nSize,nDecimals)
|
||||
nSize := if(nSize ==NIL,10,nSize )
|
||||
nDecimals := if(nDecimals==NIL, 0,nDecimals )
|
||||
nValue := nValue * (10**nDecimals)
|
||||
nSize := if(nSize/2<>int(nSize/2),nSize+1,nSize)
|
||||
nSize := if(nSize/2!=int(nSize/2),nSize+1,nSize)
|
||||
tmpstr := str( abs(nValue),nSize )
|
||||
tmpstr := strtran(tmpstr," ","0")
|
||||
cCompressed := chr( val(substr(tmpstr,1,2))+if(nValue<0,128,0) )
|
||||
@@ -120,7 +120,7 @@ function ft_unsqzn(cCompressed,nSize,nDecimals)
|
||||
nSize := if(nSize ==NIL,10,nSize )
|
||||
nDecimals := if(nDecimals==NIL, 0,nDecimals)
|
||||
cCompressed := if(multi ==-1,substr(cCompressed,2),cCompressed)
|
||||
nSize := if(nSize/2<>int(nSize/2),nSize+1,nSize)
|
||||
nSize := if(nSize/2!=int(nSize/2),nSize+1,nSize)
|
||||
if asc(cCompressed) > 127
|
||||
tmp := str(asc(cCompressed)-128,2)
|
||||
multi := -1
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* - Added refreshCurrent and another stabilize around line 349
|
||||
* - TbSkipWhile was redone
|
||||
* Note: Leo's line was changed to:
|
||||
* ELSEIF ( n > 0 .AND. RECNO() <> LASTREC() + 1)
|
||||
* ELSEIF ( n > 0 .AND. RECNO() != LASTREC() + 1)
|
||||
*
|
||||
* 3. Added DispBegin() and DispEnd() around both Stabilize sections
|
||||
*
|
||||
@@ -325,7 +325,7 @@ FUNCTION FT_BRWSWHL(aFields, bWhileCond, cKey, nFreeze, lSaveScrn, ;
|
||||
NEXT
|
||||
|
||||
/* freeze columns */
|
||||
IF nFreeze <> 0
|
||||
IF nFreeze != 0
|
||||
b:freeze := nFreeze
|
||||
ENDIF
|
||||
|
||||
@@ -452,7 +452,7 @@ STATIC FUNCTION TbSkipWhil(n, bWhileCond)
|
||||
IF n == 0 .OR. LASTREC() == 0
|
||||
SKIP 0 // significant on a network
|
||||
|
||||
ELSEIF ( n > 0 .AND. RECNO() <> LASTREC() + 1)
|
||||
ELSEIF ( n > 0 .AND. RECNO() != LASTREC() + 1)
|
||||
WHILE ( i < n )
|
||||
SKIP 1
|
||||
IF ( EOF() .OR. .NOT. Eval(bWhileCond) )
|
||||
|
||||
@@ -19,7 +19,7 @@ inkey(0)
|
||||
? ft_mylimit(0,8*maxrow())
|
||||
inkey(0)
|
||||
|
||||
do while lastkey()<>27
|
||||
do while lastkey()!=27
|
||||
? 'mouse row is',ft_mgetx()
|
||||
? 'mouse col is',ft_mgety()
|
||||
if lastkey()==27
|
||||
|
||||
@@ -766,7 +766,7 @@ METHOD LoadData(nPos) CLASS TODBC
|
||||
uData := stod( substr(uData,1,4) + substr(uData,6,2) + substr(uData,9,2) )
|
||||
|
||||
case nType == SQL_BIT
|
||||
uData = Val( uData ) == 1
|
||||
uData := Val( uData ) == 1
|
||||
|
||||
case nType == SQL_NUMERIC;
|
||||
.or. nType == SQL_DECIMAL;
|
||||
|
||||
@@ -207,7 +207,7 @@ procedure main(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15,
|
||||
dbgoto(nRecno)
|
||||
endif
|
||||
|
||||
while ! eof() .and. Inkey() <> K_ESC .and. (empty(nRecno) .or. nRecno == recno())
|
||||
while ! eof() .and. Inkey() != K_ESC .and. (empty(nRecno) .or. nRecno == recno())
|
||||
oRecord := oTable:GetBlankRow()
|
||||
|
||||
for i := 1 to oTable:FCount()
|
||||
|
||||
@@ -355,7 +355,7 @@ METHOD TableStruct( cTable ) CLASS TPQserver
|
||||
|
||||
end
|
||||
|
||||
if cType <> 'U'
|
||||
if !( cType == 'U' )
|
||||
aadd( result, { cField, cType, nSize, nDec } )
|
||||
end
|
||||
|
||||
@@ -834,7 +834,7 @@ METHOD Delete(oRow) CLASS TPQquery
|
||||
|
||||
AADD( aParams, ValueToString(xField) )
|
||||
|
||||
if i <> len(::aKeys)
|
||||
if i != len(::aKeys)
|
||||
cWhere += ' and '
|
||||
endif
|
||||
Next
|
||||
@@ -937,7 +937,7 @@ METHOD Update(oRow) CLASS TPQquery
|
||||
|
||||
cWhere += ::aKeys[i] + '=' + DataToSql(xField)
|
||||
|
||||
if i <> len(::aKeys)
|
||||
if i != len(::aKeys)
|
||||
cWhere += ' and '
|
||||
end
|
||||
Next
|
||||
|
||||
@@ -93,7 +93,7 @@ PROCEDURE MAIN()
|
||||
|
||||
cDbase := PickSQLiteFile()
|
||||
|
||||
cDatabase = IIF( ! EMPTY(cDbase), LOWER( cDbase ), "" ) // set public var
|
||||
cDatabase := IIF( ! EMPTY(cDbase), LOWER( cDbase ), "" ) // set public var
|
||||
|
||||
* cDBase := "example.db" // sample database with a couple of tables
|
||||
* cDbase := ChooseDB()
|
||||
@@ -122,7 +122,7 @@ PROCEDURE MAIN()
|
||||
nOption := 1
|
||||
|
||||
|
||||
DO WHILE nOption <> 0
|
||||
DO WHILE nOption != 0
|
||||
|
||||
@ 1,1 CLEAR TO 21,78
|
||||
|
||||
@@ -240,7 +240,7 @@ FOR n := 3 TO nLen
|
||||
PADR( "SPACES", 12), PADR( aResult[ n ][FLD_DFLT], 12) )
|
||||
|
||||
* Try to get Lenght
|
||||
cc = aResult[ n ][FLD_TYPE]
|
||||
cc := aResult[ n ][FLD_TYPE]
|
||||
nFrom := AT( "(", cc ) + 1
|
||||
nTo := AT( ")", cc )
|
||||
|
||||
@@ -328,7 +328,7 @@ LOCAL aTables, cStatment, nLen
|
||||
int nRow, rc;
|
||||
char *zErrMsg;
|
||||
open_db(p);
|
||||
if( nArg==1 ){
|
||||
if( nArg==1 )
|
||||
rc = sqlite_get_table(p->db,
|
||||
"SELECT name FROM sqlite_master "
|
||||
"WHERE type IN ('table','view') "
|
||||
@@ -387,7 +387,7 @@ cDBase := "Tablon"
|
||||
nFields := LEN( aStruct )
|
||||
|
||||
/*
|
||||
FOR n = 1 TO nFields
|
||||
FOR n := 1 TO nFields
|
||||
cFList := cFList + ;
|
||||
cSpace + aStruct[ n][DBS_NAME] + cSpace +;
|
||||
ConvertFldType( aStruct[ n][DBS_TYPE] ) +;
|
||||
@@ -410,7 +410,7 @@ DO WHILE ! EOF()
|
||||
|
||||
* Put all fields in a row list comma separated
|
||||
cFList := ""
|
||||
FOR n = 1 TO nFields
|
||||
FOR n := 1 TO nFields
|
||||
cFList := cFList + ;
|
||||
cQuote + RTRIM( xconvert( FIELDGET( n )) ) + cQuote+ ;
|
||||
IIF( n < FCOUNT(), ",", "")
|
||||
@@ -615,15 +615,15 @@ RETURN 0
|
||||
* It's a work in progress and would have some errors
|
||||
*---------------------------------------------------------------------------
|
||||
LOCAL cData, cType, nLen
|
||||
cType = VALTYPE( xData )
|
||||
cType := VALTYPE( xData )
|
||||
|
||||
DO CASE
|
||||
CASE cType == "N"
|
||||
cData = STR( xData )
|
||||
cData := STR( xData )
|
||||
CASE cType == "C"
|
||||
cData = xData
|
||||
cData := xData
|
||||
CASE cType == "L"
|
||||
cData = IIF( xData == .T., "TRUE", "FALSE")
|
||||
cData := IIF( xData == .T., "TRUE", "FALSE")
|
||||
CASE cType == "A"
|
||||
nLen := LEN(xData)
|
||||
cData := "ARRAY[" + IIF( nLen > 0, STR( nLen, 2), "0") + "]"
|
||||
@@ -635,12 +635,12 @@ DO CASE
|
||||
? xData
|
||||
cData := DTOS( xData )
|
||||
OTHERWISE
|
||||
cData = VALTYPE( xData)
|
||||
cData := VALTYPE( xData)
|
||||
ENDCASE
|
||||
|
||||
IF nPad == NIL .OR. VALTYPE(nPad ) != "N"
|
||||
ELSE
|
||||
cData = PADL( LTRIM(cData), nPad, " ")
|
||||
cData := PADL( LTRIM(cData), nPad, " ")
|
||||
ENDIF
|
||||
|
||||
RETURN( cData)
|
||||
@@ -917,7 +917,7 @@ RETURN( nOpt )
|
||||
SETPOS( nOldRow, nOldCol )
|
||||
SETCOLOR( cOldColor )
|
||||
|
||||
cDatabase = IIF( ! EMPTY(cDB), LOWER( RTRIM( cDB ) ), "" )
|
||||
cDatabase := IIF( ! EMPTY(cDB), LOWER( RTRIM( cDB ) ), "" )
|
||||
|
||||
RETURN( cDataBase )
|
||||
|
||||
@@ -935,7 +935,7 @@ LOCAL nLength
|
||||
|
||||
IF FILE( cFilename )
|
||||
|
||||
nHandle = FOPEN( cFilename, FO_READ)
|
||||
nHandle := FOPEN( cFilename, FO_READ)
|
||||
|
||||
* Don't show any error here
|
||||
* IF FERROR() != 0
|
||||
@@ -1062,8 +1062,8 @@ RETURN( cQuery )
|
||||
* insert
|
||||
* CAMBIA EL MODO INSERT ON /OFF DESDE UN "READ"
|
||||
*---------------------------------------------------------------------------
|
||||
ins_on = .NOT. ins_on
|
||||
IIF (ins_on, READINSERT(.T.), READINSERT(.F.))
|
||||
ins_on := .NOT. ins_on
|
||||
IIF(ins_on, READINSERT(.T.), READINSERT(.F.))
|
||||
Ins_stat()
|
||||
RETURN
|
||||
|
||||
@@ -1159,4 +1159,4 @@ RETURN 0
|
||||
SETPOS( nOldRow, nOldCol )
|
||||
SETCOLOR( cOldColor )
|
||||
|
||||
RETURN( cPick )
|
||||
RETURN cPick
|
||||
|
||||
@@ -230,7 +230,7 @@ PROCEDURE t2()
|
||||
?
|
||||
? "sqlite3_get_table"
|
||||
?
|
||||
aTable = sqlite3_get_table( db, "SELECT name, age FROM t1 WHERE age BETWEEN 10 AND 20" )
|
||||
aTable := sqlite3_get_table( db, "SELECT name, age FROM t1 WHERE age BETWEEN 10 AND 20" )
|
||||
FOR nI := 1 TO Len( aTable )
|
||||
FOR nJ := 1 TO Len( aTable[nI] )
|
||||
?? aTable[nI][nJ], " "
|
||||
|
||||
@@ -389,7 +389,7 @@ function tp_recvto( nPort, cDelim, nMaxlen, nTimeout )
|
||||
return ""
|
||||
endif
|
||||
|
||||
if ValType( cDelim ) <> "C" .OR. Empty( cDelim )
|
||||
if !( ValType( cDelim ) == "C" ) .OR. Empty( cDelim )
|
||||
return ""
|
||||
endif
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ DEFAULT cId to ""
|
||||
cString := left( cString, nAt - 1 ) + ltrim(str( pdfPageNumber())) + substr( cString, nAt + 12 )
|
||||
ENDIF
|
||||
|
||||
lReverse = .f.
|
||||
lReverse := .f.
|
||||
IF cUnits == "M"
|
||||
nRow := pdfM2Y( nRow )
|
||||
nCol := pdfM2X( nCol )
|
||||
@@ -46,7 +46,7 @@ DEFAULT cId to ""
|
||||
pdfBox( aReport[ PAGEY ] - nRow - aReport[ FONTSIZE ] + 2.0 , nCol, aReport[ PAGEY ] - nRow + 2.0, nCol + pdfM2X( pdfLen( cString )) + 1,,100, "D")
|
||||
//aReport[ PAGEBUFFER ] += " 1 g "
|
||||
pdfAddBuffer( " 1 g " )
|
||||
lReverse = .t.
|
||||
lReverse := .t.
|
||||
ELSEIF right( cString, 1 ) == chr(254) //underline
|
||||
cString := left( cString, len( cString ) - 1 )
|
||||
//pdfBox( nCol, nRow - 1.5, nCol + pdfM2X( pdfLen( cString )) + 1, nRow - 1,,100, "D")
|
||||
@@ -70,11 +70,11 @@ DEFAULT cId to ""
|
||||
// version 0.01
|
||||
|
||||
_nFont := ascan( aReport[ FONTS ], {|arr| arr[1] == aReport[ FONTNAME ]} )
|
||||
IF aReport[ FONTNAME ] <> aReport[ FONTNAMEPREV ]
|
||||
IF !( aReport[ FONTNAME ] == aReport[ FONTNAMEPREV ] )
|
||||
aReport[ FONTNAMEPREV ] := aReport[ FONTNAME ]
|
||||
//aReport[ PAGEBUFFER ] += CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET"
|
||||
pdfAddBuffer( CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET" )
|
||||
ELSEIF aReport[ FONTSIZE ] <> aReport[ FONTSIZEPREV ]
|
||||
ELSEIF aReport[ FONTSIZE ] != aReport[ FONTSIZEPREV ]
|
||||
aReport[ FONTSIZEPREV ] := aReport[ FONTSIZE ]
|
||||
//aReport[ PAGEBUFFER ] += CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET"
|
||||
pdfAddBuffer( CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET" )
|
||||
@@ -498,7 +498,7 @@ local nI, cTemp, nCurLevel, nObj1, nLast, nCount, nFirst, nRecno, nBooklen
|
||||
IIF( aReport[ BOOKMARK ][ nRecno ][ BOOKNEXT ] > 0, "/Next " + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKNEXT ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( aReport[ BOOKMARK ][ nRecno ][ BOOKFIRST ] > 0, "/First " + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKFIRST ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( aReport[ BOOKMARK ][ nRecno ][ BOOKLAST ] > 0, "/Last " + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKLAST ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ] <> 0, "/Count " + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ])) + CRLF, "") + ;
|
||||
IIF( aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ] != 0, "/Count " + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ])) + CRLF, "") + ;
|
||||
">>" + CRLF + "endobj" + CRLF
|
||||
// "/Dest [" + ltrim(str( aReport[ BOOKMARK ][ nRecno ][ BOOKPAGE ] * 3 )) + " 0 R /XYZ 0 " + ltrim( str( aReport[ BOOKMARK ][ nRecno ][ BOOKCOORD ])) + " 0]" + CRLF + ;
|
||||
// "/Dest [" + ltrim(str( aReport[ PAGES ][ nRecno ] )) + " 0 R /XYZ 0 " + ltrim( str( aReport[ BOOKMARK ][ nRecno ][ BOOKCOORD ])) + " 0]" + CRLF + ;
|
||||
@@ -1083,7 +1083,7 @@ DEFAULT _cPageSize to "LETTER"
|
||||
|
||||
nSize := ascan( aSize, { |arr| arr[ 1 ] = _cPageSize } )
|
||||
|
||||
IF nSize = 0 //.or. nSize > 2 //0.05
|
||||
IF nSize == 0 //.or. nSize > 2 //0.05
|
||||
nSize := 1
|
||||
ENDIF
|
||||
|
||||
@@ -1277,7 +1277,7 @@ DEFAULT cColor to ""
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
nLineLen += nSpace * nNew
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
lParagraph := .f.
|
||||
@@ -1313,7 +1313,7 @@ DEFAULT cColor to ""
|
||||
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1357,7 +1357,7 @@ DEFAULT cColor to ""
|
||||
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1416,7 +1416,7 @@ local nFinish, nL, nB, nJ, cToken, nRow
|
||||
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1483,7 +1483,7 @@ static function TimeAsAMPM( cTime ) /*
|
||||
ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ */
|
||||
IF VAL(cTime) < 12
|
||||
cTime += " am"
|
||||
ELSEIF VAL(cTime) = 12
|
||||
ELSEIF VAL(cTime) == 12
|
||||
cTime += " pm"
|
||||
ELSE
|
||||
cTime := STR(VAL(cTime) - 12, 2) + SUBSTR(cTime, 3) + " pm"
|
||||
@@ -1958,7 +1958,7 @@ endif
|
||||
*/
|
||||
fread( nHandle, @c2, 2 )
|
||||
/*
|
||||
if c2 <> '*' + chr(0)
|
||||
if !( c2 == '*' ) + chr(0)
|
||||
alert("Not *")
|
||||
endif
|
||||
*/
|
||||
@@ -1968,7 +1968,7 @@ endif
|
||||
cTemp := space(12)
|
||||
nPages := 0
|
||||
|
||||
while cIFDNext <> c40 //read IFD's
|
||||
while !( cIFDNext == c40 ) //read IFD's
|
||||
|
||||
nIFD := bin2l( cIFDNext )
|
||||
|
||||
@@ -2036,7 +2036,7 @@ endif
|
||||
//??'ImageWidth'
|
||||
cTag := 'ImageWidth'
|
||||
/*
|
||||
IF nFieldType <> SHORT .and. nFieldType <> LONG
|
||||
IF nFieldType != SHORT .and. nFieldType != LONG
|
||||
alert('Wrong Type for ImageWidth')
|
||||
ENDIF
|
||||
*/
|
||||
@@ -2056,7 +2056,7 @@ endif
|
||||
//??'ImageLength'
|
||||
cTag := 'ImageLength'
|
||||
/*
|
||||
IF nFieldType <> SHORT .and. nFieldType <> LONG
|
||||
IF nFieldType != SHORT .and. nFieldType != LONG
|
||||
alert('Wrong Type for ImageLength')
|
||||
ENDIF
|
||||
*/
|
||||
@@ -2084,7 +2084,7 @@ endif
|
||||
//alert('Wrong Type for BitsPerSample')
|
||||
ENDIF
|
||||
nBits := nTemp
|
||||
//IF nTemp <> 4 .and. nTemp <> 8
|
||||
//IF nTemp != 4 .and. nTemp != 8
|
||||
// alert('Wrong Value for BitsPerSample')
|
||||
//ENDIF
|
||||
case nTag == 259
|
||||
@@ -2112,7 +2112,7 @@ endif
|
||||
ELSE
|
||||
//alert('Wrong Type for Compression')
|
||||
ENDIF
|
||||
//IF nTemp <> 1 .and. nTemp <> 2 .and. nTemp <> 32773
|
||||
//IF nTemp != 1 .and. nTemp != 2 .and. nTemp != 32773
|
||||
// alert('Wrong Value for Compression')
|
||||
//ENDIF
|
||||
case nTag == 262
|
||||
@@ -2135,7 +2135,7 @@ endif
|
||||
ELSE
|
||||
//alert('Wrong Type for PhotometricInterpretation')
|
||||
ENDIF
|
||||
IF nTemp <> 0 .and. nTemp <> 1 .and. nTemp <> 2 .and. nTemp <> 3
|
||||
IF nTemp != 0 .and. nTemp != 1 .and. nTemp != 2 .and. nTemp != 3
|
||||
//alert('Wrong Value for PhotometricInterpretation')
|
||||
ENDIF
|
||||
case nTag == 264
|
||||
@@ -2149,7 +2149,7 @@ endif
|
||||
*/
|
||||
//??'CellWidth'
|
||||
cTag := 'CellWidth'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for CellWidth')
|
||||
ENDIF
|
||||
case nTag == 265
|
||||
@@ -2165,7 +2165,7 @@ endif
|
||||
*/
|
||||
//??'CellLength'
|
||||
cTag := 'CellLength'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for CellLength')
|
||||
ENDIF
|
||||
case nTag == 266
|
||||
@@ -2178,7 +2178,7 @@ endif
|
||||
*/
|
||||
//??'FillOrder'
|
||||
cTag := 'FillOrder'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for FillOrder')
|
||||
ENDIF
|
||||
case nTag == 273
|
||||
@@ -2190,7 +2190,7 @@ endif
|
||||
*/
|
||||
//??'StripOffsets'
|
||||
cTag := 'StripOffsets'
|
||||
IF nFieldType <> SHORT .and. nFieldType <> LONG
|
||||
IF nFieldType != SHORT .and. nFieldType != LONG
|
||||
//alert('Wrong Type for StripOffsets')
|
||||
ENDIF
|
||||
|
||||
@@ -2210,7 +2210,7 @@ endif
|
||||
*/
|
||||
//??'SamplesPerPixel'
|
||||
cTag := 'SamplesPerPixel'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for SamplesPerPixel')
|
||||
ENDIF
|
||||
case nTag == 278
|
||||
@@ -2226,7 +2226,7 @@ endif
|
||||
*/
|
||||
//??'RowsPerStrip'
|
||||
cTag := 'RowsPerStrip'
|
||||
IF nFieldType <> SHORT .and. nFieldType <> LONG
|
||||
IF nFieldType != SHORT .and. nFieldType != LONG
|
||||
//alert('Wrong Type for RowsPerStrip')
|
||||
ENDIF
|
||||
case nTag == 279
|
||||
@@ -2238,7 +2238,7 @@ endif
|
||||
*/
|
||||
//??'StripByteCounts'
|
||||
cTag := 'StripByteCounts'
|
||||
IF nFieldType <> SHORT .and. nFieldType <> LONG
|
||||
IF nFieldType != SHORT .and. nFieldType != LONG
|
||||
//alert('Wrong Type for StripByteCounts')
|
||||
ENDIF
|
||||
|
||||
@@ -2260,7 +2260,7 @@ endif
|
||||
*/
|
||||
//??'XResolution'
|
||||
cTag := 'XResolution'
|
||||
IF nFieldType <> RATIONAL
|
||||
IF nFieldType != RATIONAL
|
||||
//alert('Wrong Type for XResolution')
|
||||
ENDIF
|
||||
xRes := bin2l(substr( cValues, 1, 4 ))
|
||||
@@ -2274,14 +2274,14 @@ endif
|
||||
*/
|
||||
//??'YResolution'
|
||||
cTag := 'YResolution'
|
||||
IF nFieldType <> RATIONAL
|
||||
IF nFieldType != RATIONAL
|
||||
//alert('Wrong Type for YResolution')
|
||||
ENDIF
|
||||
yRes := bin2l(substr( cValues, 1, 4 ))
|
||||
case nTag == 284
|
||||
//??'PlanarConfiguration'
|
||||
cTag := 'PlanarConfiguration'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for PlanarConfiguration')
|
||||
ENDIF
|
||||
case nTag == 288
|
||||
@@ -2296,7 +2296,7 @@ endif
|
||||
*/
|
||||
//??'FreeOffsets'
|
||||
cTag := 'FreeOffsets'
|
||||
IF nFieldType <> LONG
|
||||
IF nFieldType != LONG
|
||||
//alert('Wrong Type for FreeOffsets')
|
||||
ENDIF
|
||||
case nTag == 289
|
||||
@@ -2311,7 +2311,7 @@ endif
|
||||
*/
|
||||
//??'FreeByteCounts'
|
||||
cTag := 'FreeByteCounts'
|
||||
IF nFieldType <> LONG
|
||||
IF nFieldType != LONG
|
||||
//alert('Wrong Type for FreeByteCounts')
|
||||
ENDIF
|
||||
case nTag == 296
|
||||
@@ -2334,13 +2334,13 @@ endif
|
||||
ELSE
|
||||
//alert('Wrong Type for ResolutionUnit')
|
||||
ENDIF
|
||||
IF nTemp <> 1 .and. nTemp <> 2 .and. nTemp <> 3
|
||||
IF nTemp != 1 .and. nTemp != 2 .and. nTemp != 3
|
||||
//alert('Wrong Value for ResolutionUnit')
|
||||
ENDIF
|
||||
case nTag == 305
|
||||
//??'Software'
|
||||
cTag := 'Software'
|
||||
IF nFieldType <> ASCII
|
||||
IF nFieldType != ASCII
|
||||
//alert('Wrong Type for Software')
|
||||
ENDIF
|
||||
case nTag == 306
|
||||
@@ -2356,7 +2356,7 @@ endif
|
||||
*/
|
||||
//??'DateTime'
|
||||
cTag := 'DateTime'
|
||||
IF nFieldType <> ASCII
|
||||
IF nFieldType != ASCII
|
||||
//alert('Wrong Type for DateTime')
|
||||
ENDIF
|
||||
case nTag == 315
|
||||
@@ -2369,7 +2369,7 @@ endif
|
||||
*/
|
||||
//??'Artist'
|
||||
cTag := 'Artist'
|
||||
IF nFieldType <> ASCII
|
||||
IF nFieldType != ASCII
|
||||
//alert('Wrong Type for Artist')
|
||||
ENDIF
|
||||
case nTag == 320
|
||||
@@ -2388,7 +2388,7 @@ endif
|
||||
*/
|
||||
//??'ColorMap'
|
||||
cTag := 'ColorMap'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for ColorMap')
|
||||
ENDIF
|
||||
case nTag == 338
|
||||
@@ -2401,7 +2401,7 @@ endif
|
||||
*/
|
||||
//??'ExtraSamples'
|
||||
cTag := 'ExtraSamples'
|
||||
IF nFieldType <> SHORT
|
||||
IF nFieldType != SHORT
|
||||
//alert('Wrong Type for ExtraSamples')
|
||||
ENDIF
|
||||
case nTag == 33432
|
||||
@@ -2417,7 +2417,7 @@ endif
|
||||
*/
|
||||
//??'Copyright'
|
||||
cTag := 'Copyright'
|
||||
IF nFieldType <> ASCII
|
||||
IF nFieldType != ASCII
|
||||
//alert('Wrong Type for Copyright')
|
||||
ENDIF
|
||||
otherwise
|
||||
|
||||
@@ -215,7 +215,7 @@ DEFAULT cId TO ""
|
||||
cString := left( cString, nAt - 1 ) + ltrim(str( ::PageNumber())) + substr( cString, nAt + 12 )
|
||||
ENDIF
|
||||
|
||||
lReverse = .f.
|
||||
lReverse := .f.
|
||||
IF cUnits == "M"
|
||||
nRow := ::M2Y( nRow )
|
||||
nCol := ::M2X( nCol )
|
||||
@@ -235,7 +235,7 @@ DEFAULT cId TO ""
|
||||
cString := left( cString, len( cString ) - 1 )
|
||||
::Box( ::aReport[ PAGEY ] - nRow - ::aReport[ FONTSIZE ] + 2.0 , nCol, ::aReport[ PAGEY ] - nRow + 2.0, nCol + ::M2X( ::length( cString )) + 1,,100, "D")
|
||||
::aReport[ PAGEBUFFER ] += " 1 g "
|
||||
lReverse = .t.
|
||||
lReverse := .t.
|
||||
ELSEIF right( cString, 1 ) == chr(254) //underline
|
||||
cString := left( cString, len( cString ) - 1 )
|
||||
::Box( ::aReport[ PAGEY ] - nRow + 0.5, nCol, ::aReport[ PAGEY ] - nRow + 1, nCol + ::M2X( ::length( cString )) + 1,,100, "D")
|
||||
@@ -252,10 +252,10 @@ DEFAULT cId TO ""
|
||||
// version 0.01
|
||||
|
||||
_nFont := ascan( ::aReport[ FONTS ], {|arr| arr[1] == ::aReport[ FONTNAME ]} )
|
||||
IF ::aReport[ FONTNAME ] <> ::aReport[ FONTNAMEPREV ]
|
||||
IF !( ::aReport[ FONTNAME ] == ::aReport[ FONTNAMEPREV ] )
|
||||
::aReport[ FONTNAMEPREV ] := ::aReport[ FONTNAME ]
|
||||
::aReport[ PAGEBUFFER ] += CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( ::aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET"
|
||||
ELSEIF ::aReport[ FONTSIZE ] <> ::aReport[ FONTSIZEPREV ]
|
||||
ELSEIF ::aReport[ FONTSIZE ] != ::aReport[ FONTSIZEPREV ]
|
||||
::aReport[ FONTSIZEPREV ] := ::aReport[ FONTSIZE ]
|
||||
::aReport[ PAGEBUFFER ] += CRLF + "BT /Fo" + ltrim(str( _nFont )) + " " + ltrim(transform( ::aReport[ FONTSIZE ], "999.99")) + " Tf " + ltrim(transform( nCol, "9999.99" )) + " " + ltrim(transform( nRow, "9999.99" )) + " Td (" + cString + ") Tj ET"
|
||||
ELSE
|
||||
@@ -625,7 +625,7 @@ local nI, cTemp, nCurLevel, nObj1, nLast, nCount, nFirst, nRecno, nBooklen
|
||||
IIF( ::aReport[ BOOKMARK ][ nRecno ][ BOOKNEXT ] > 0, "/Next " + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKNEXT ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( ::aReport[ BOOKMARK ][ nRecno ][ BOOKFIRST ] > 0, "/First " + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKFIRST ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( ::aReport[ BOOKMARK ][ nRecno ][ BOOKLAST ] > 0, "/Last " + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKLAST ])) + " 0 R" + CRLF, "") + ;
|
||||
IIF( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ] <> 0, "/Count " + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ])) + CRLF, "") + ;
|
||||
IIF( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ] != 0, "/Count " + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOUNT ])) + CRLF, "") + ;
|
||||
">>" + CRLF + "endobj" + CRLF
|
||||
// "/Dest [" + ltrim(str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKPAGE ] * 3 )) + " 0 R /XYZ 0 " + ltrim( str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOORD ])) + " 0]" + CRLF + ;
|
||||
// "/Dest [" + ltrim(str( ::aReport[ PAGES ][ nRecno ] )) + " 0 R /XYZ 0 " + ltrim( str( ::aReport[ BOOKMARK ][ nRecno ][ BOOKCOORD ])) + " 0]" + CRLF + ;
|
||||
@@ -826,7 +826,7 @@ DEFAULT _cPageSize TO "LETTER"
|
||||
|
||||
nSize := ascan( aSize, { |arr| arr[ 1 ] = _cPageSize } )
|
||||
|
||||
IF nSize = 0 .or. nSize > 2
|
||||
IF nSize == 0 .or. nSize > 2
|
||||
nSize := 1
|
||||
ENDIF
|
||||
|
||||
@@ -1053,7 +1053,7 @@ DEFAULT cColor TO ""
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
nLineLen += nSpace * nNew
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
lParagraph := .f.
|
||||
@@ -1521,13 +1521,13 @@ local nI, nLen := len( ::aReport[ HEADER ] ), nTemp, aTemp, nHeight
|
||||
ENDIF
|
||||
next
|
||||
|
||||
IF nTop <> NIL
|
||||
IF nTop != NIL
|
||||
::aReport[ PDFTOP] := nTop
|
||||
ENDIF
|
||||
IF nLeft <> NIL
|
||||
IF nLeft != NIL
|
||||
::aReport[ PDFLEFT ] := nLeft
|
||||
ENDIF
|
||||
IF nBottom <> NIL
|
||||
IF nBottom != NIL
|
||||
::aReport[ PDFBOTTOM ] := nBottom
|
||||
ENDIF
|
||||
|
||||
@@ -1680,7 +1680,7 @@ local nWidth := 0, nHeight := 0, nBits := 0, nFrom := 0, nLength := 0, xRes := 0
|
||||
cTemp := space(12)
|
||||
nPages := 0
|
||||
|
||||
while cIFDNext <> c40 //read IFD's
|
||||
while !( cIFDNext == c40 ) //read IFD's
|
||||
|
||||
nIFD := bin2l( cIFDNext )
|
||||
|
||||
@@ -2109,7 +2109,7 @@ local nFinish, nL, nB, nJ, cToken, nRow
|
||||
|
||||
nL := nLeft
|
||||
IF lParagraph
|
||||
IF nJustify <> 2
|
||||
IF nJustify != 2
|
||||
nL += nSpace * nNew
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -2414,7 +2414,7 @@ return str(asc( cChar ) / 255, 4, 2)
|
||||
static function TimeAsAMPM( cTime )
|
||||
IF VAL(cTime) < 12
|
||||
cTime += " am"
|
||||
ELSEIF VAL(cTime) = 12
|
||||
ELSEIF VAL(cTime) == 12
|
||||
cTime += " pm"
|
||||
ELSE
|
||||
cTime := STR(VAL(cTime) - 12, 2) + SUBSTR(cTime, 3) + " pm"
|
||||
@@ -2504,7 +2504,7 @@ RETURN cRet
|
||||
static function Array2File( cFile, aRay, nDepth, hFile )
|
||||
local nBytes := 0
|
||||
local i
|
||||
local lOpen := ( hFile <> nil )
|
||||
local lOpen := ( hFile != nil )
|
||||
|
||||
nDepth := if( ISNUMBER( nDepth ), nDepth, 0 )
|
||||
//if hFile == NIL
|
||||
@@ -2555,7 +2555,7 @@ static function File2Array( cFile, nLen, hFile )
|
||||
LOCAL cData,cType,nDataLen,nBytes
|
||||
local nDepth := 0
|
||||
local aRay := {}
|
||||
local lOpen := ( hFile <> nil )
|
||||
local lOpen := ( hFile != nil )
|
||||
|
||||
if hFile == NIL // First Timer
|
||||
if ( hFile := fOpen( cFile,FO_READ ) ) == -1
|
||||
@@ -2563,7 +2563,7 @@ if hFile == NIL // First Timer
|
||||
endif
|
||||
cData := space( 3 )
|
||||
fRead( hFile, @cData, 3 )
|
||||
if left( cData,1 ) != 'A' // If format of file <> array
|
||||
if left( cData,1 ) != 'A' // If format of file != array
|
||||
fClose( hFile ) //////////
|
||||
return( aRay )
|
||||
endif
|
||||
@@ -2628,7 +2628,7 @@ local lRet := .t.
|
||||
#endif
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
if cVerb <> nil
|
||||
if cVerb != nil
|
||||
// TOFIX: This requires hbwhat32, which in turns requires xhb.
|
||||
// This has to solved differently.
|
||||
// ShellExecute( GetDeskTopWindow(), cVerb, cFile, , , 1 )
|
||||
|
||||
@@ -209,16 +209,15 @@ local cTemp, nI, cChar := "", n := 0, nLen
|
||||
for nI := nLen to 1 step -1
|
||||
cTemp += substr( cString, nI, 1 )
|
||||
next
|
||||
cTemp = upper( cTemp )
|
||||
cTemp := upper( cTemp )
|
||||
|
||||
for nI = 1 to nLen
|
||||
cChar = substr( cTemp, nI, 1 )
|
||||
for nI := 1 to nLen
|
||||
cChar := substr( cTemp, nI, 1 )
|
||||
if .not. IsDigit( cChar )
|
||||
n = n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
|
||||
n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
|
||||
else
|
||||
n = n + (( nBase ^ ( nI - 1 )) * val( cChar ))
|
||||
n := n + (( nBase ^ ( nI - 1 )) * val( cChar ))
|
||||
endif
|
||||
next
|
||||
|
||||
return n
|
||||
|
||||
|
||||
@@ -173,14 +173,14 @@ local cTemp, nI, cChar := "", n := 0, nLen
|
||||
for nI := nLen to 1 step -1
|
||||
cTemp += substr( cString, nI, 1 )
|
||||
next
|
||||
cTemp = upper( cTemp )
|
||||
cTemp := upper( cTemp )
|
||||
|
||||
for nI = 1 to nLen
|
||||
cChar = substr( cTemp, nI, 1 )
|
||||
for nI := 1 to nLen
|
||||
cChar := substr( cTemp, nI, 1 )
|
||||
if .not. IsDigit( cChar )
|
||||
n = n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
|
||||
n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
|
||||
else
|
||||
n = n + (( nBase ^ ( nI - 1 )) * val( cChar ))
|
||||
n := n + (( nBase ^ ( nI - 1 )) * val( cChar ))
|
||||
endif
|
||||
next
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ METHOD OleValueEqual( xArg ) CLASS TOleAuto
|
||||
LOCAL xRet, oErr
|
||||
|
||||
TRY
|
||||
xRet := ::OleValue = xArg
|
||||
xRet := ( ::OleValue = xArg ) /* NOTE: Intentionally using '=' operator. */
|
||||
CATCH
|
||||
oErr := ErrorNew()
|
||||
oErr:Args := { Self, xArg }
|
||||
@@ -596,7 +596,7 @@ METHOD OleValueExactEqual( xArg ) CLASS TOleAuto
|
||||
LOCAL xRet, oErr
|
||||
|
||||
TRY
|
||||
xRet := ::OleValue == xArg
|
||||
xRet := ( ::OleValue == xArg )
|
||||
CATCH
|
||||
oErr := ErrorNew()
|
||||
oErr:Args := { Self, xArg }
|
||||
|
||||
@@ -362,23 +362,23 @@ METHOD EndDoc(lAbortDoc) CLASS WIN32PRN
|
||||
METHOD StartPage() CLASS WIN32PRN
|
||||
LOCAL lLLandScape, nLBinNumber, nLFormType, nLDuplexType, nLPrintQuality
|
||||
LOCAL lChangeDP:= .F.
|
||||
IF ::LandScape <> ::fOldLandScape // Direct-modify property
|
||||
IF ::LandScape != ::fOldLandScape // Direct-modify property
|
||||
lLLandScape:= ::fOldLandScape := ::LandScape
|
||||
lChangeDP:= .T.
|
||||
ENDIF
|
||||
IF ::BinNumber <> ::fOldBinNumber // Direct-modify property
|
||||
IF ::BinNumber != ::fOldBinNumber // Direct-modify property
|
||||
nLBinNumber:= ::fOldBinNumber := ::BinNumber
|
||||
lChangeDP:= .T.
|
||||
ENDIF
|
||||
IF ::FormType <> ::fOldFormType // Direct-modify property
|
||||
IF ::FormType != ::fOldFormType // Direct-modify property
|
||||
nLFormType:= ::fOldFormType := ::FormType
|
||||
lChangeDP:= .T.
|
||||
ENDIF
|
||||
IF ::fDuplexType <> ::fNewDuplexType // Get/Set property
|
||||
IF ::fDuplexType != ::fNewDuplexType // Get/Set property
|
||||
nLDuplexType:= ::fDuplexType:= ::fNewDuplexType
|
||||
lChangeDP:= .T.
|
||||
ENDIF
|
||||
IF ::fPrintQuality <> ::fNewPrintQuality // Get/Set property
|
||||
IF ::fPrintQuality != ::fNewPrintQuality // Get/Set property
|
||||
nLPrintQuality:= ::fPrintQuality:= ::fNewPrintQuality
|
||||
lChangeDP:= .T.
|
||||
ENDIF
|
||||
|
||||
@@ -19,72 +19,72 @@ Static spzan
|
||||
|
||||
Function Main()
|
||||
|
||||
m_hWnd = dd_CreateWindow()
|
||||
m_hWnd := dd_CreateWindow()
|
||||
|
||||
// Background...........
|
||||
|
||||
sfBack = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfBack := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfBack, "black.bmp", 0 , 0, 640, 480 )
|
||||
spBack = dd_CreateSprite( sfBack, "background", 640, 480, 1, 101, .t., 240 )
|
||||
spBack := dd_CreateSprite( sfBack, "background", 640, 480, 1, 101, .t., 240 )
|
||||
dd_SPSetXY( spBack, 0,0)
|
||||
|
||||
|
||||
// Bricks......
|
||||
|
||||
sfBreak1 = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfBreak1 := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfBreak1, "brick1.bmp", 0 , 0, 640, 480 )
|
||||
|
||||
sfBreak2 = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfBreak2 := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfBreak2, "brick2.bmp", 0 , 0, 640, 480 )
|
||||
|
||||
sfBreak3 = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfBreak3 := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfBreak3, "brick3.bmp", 0 , 0, 640, 480 )
|
||||
|
||||
spaBreaks = Array(80)
|
||||
nCont = 1
|
||||
for t=1 to 80
|
||||
if nCont = 3
|
||||
spaBreaks[t] = dd_CreateSprite( sfBreak3, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont = 1
|
||||
spaBreaks := Array(80)
|
||||
nCont := 1
|
||||
for t := 1 to 80
|
||||
if nCont == 3
|
||||
spaBreaks[t] := dd_CreateSprite( sfBreak3, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont := 1
|
||||
else
|
||||
if nCont = 2
|
||||
spaBreaks[t] = dd_CreateSprite( sfBreak2, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont = 3
|
||||
if nCont == 2
|
||||
spaBreaks[t] := dd_CreateSprite( sfBreak2, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont := 3
|
||||
else
|
||||
if nCont = 1
|
||||
spaBreaks[t] = dd_CreateSprite( sfBreak1, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont = 2
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
if nCont == 1
|
||||
spaBreaks[t] := dd_CreateSprite( sfBreak1, "Break", 30, 15, 6, 100, .f., 240 )
|
||||
nCont := 2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
dd_SPSetSolid( spaBreaks[t], .t. )
|
||||
dd_SPSetVisible( spaBreaks[t], .t. )
|
||||
dd_SPOnCollision( spaBreaks[t], "BRICK_ONCOLLISION" )
|
||||
next
|
||||
|
||||
for t=1 to 20
|
||||
for t := 1 to 20
|
||||
dd_SPSetXY( spaBreaks[t], t*30 + 5,10 )
|
||||
next
|
||||
for t=21 to 40
|
||||
for t := 21 to 40
|
||||
dd_SPSetXY( spaBreaks[t], ( t - 20 ) * 30 + 12,25 )
|
||||
next
|
||||
for t=41 to 60
|
||||
for t := 41 to 60
|
||||
dd_SPSetXY( spaBreaks[t], ( t - 40 ) * 30+ 5 ,40 )
|
||||
next
|
||||
for t=61 to 80
|
||||
for t := 61 to 80
|
||||
dd_SPSetXY( spaBreaks[t], ( t - 60 ) * 30 + 12,55 )
|
||||
next
|
||||
|
||||
// Shots......
|
||||
|
||||
sfShot = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfShot := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfShot, "shot.bmp", 0 , 0, 640, 480 )
|
||||
spShots = Array( 10 )
|
||||
nShotsActive = 1
|
||||
spShots := Array( 10 )
|
||||
nShotsActive := 1
|
||||
|
||||
for t=1 to 10
|
||||
spShots[t] = dd_CreateSprite( sfShot, "Shot", 10, 20, 3, 100, .f., 240 )
|
||||
for t := 1 to 10
|
||||
spShots[t] := dd_CreateSprite( sfShot, "Shot", 10, 20, 3, 100, .f., 240 )
|
||||
dd_SPSetSolid( spShots[ t ], .t. )
|
||||
dd_SPSetMasked( spShots[ t ], .t. )
|
||||
dd_SPOnOutScreen( spShots[ t ], "SHOT_OUTOFBOUND" )
|
||||
@@ -93,16 +93,16 @@ Function Main()
|
||||
|
||||
// Bunny..........
|
||||
|
||||
sfBunny = dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
sfBunny := dd_CreateOffScreenBitmap(NIL,NIL)
|
||||
dd_LoadBmpIntoSurface( sfBunny, "anima2.bmp", 0 , 0, 640, 480 )
|
||||
spBunny = dd_CreateSprite( sfBunny, "bunny",70,52 , 6, 101, .t., 240 )
|
||||
spBunny := dd_CreateSprite( sfBunny, "bunny",70,52 , 6, 101, .t., 240 )
|
||||
|
||||
dd_SPSetMasked( spBunny, .t. )
|
||||
dd_SPSetXY( spBunny, 0, 420 )
|
||||
dd_SPOnFirstFrame( spBunny, "BUNNY_ONFIRSTFRAME" )
|
||||
dd_SPSetVisible( spBunny , .t. )
|
||||
|
||||
spBunnyLife = 4
|
||||
spBunnyLife := 4
|
||||
|
||||
dd_StartWindow( m_hWnd )
|
||||
|
||||
@@ -113,16 +113,16 @@ return
|
||||
//-------------------------------------------------------------//
|
||||
|
||||
function Brick_OnCollision( nMe, nCollided )
|
||||
lOk = .f.
|
||||
for t=1 to 10
|
||||
if nCollided = spShots[t]
|
||||
lOk = .t.
|
||||
end if
|
||||
lOk := .f.
|
||||
for t := 1 to 10
|
||||
if nCollided == spShots[t]
|
||||
lOk := .t.
|
||||
endif
|
||||
next
|
||||
if lOk
|
||||
dd_SPSetVisible( nCollided, .f. )
|
||||
dd_SPSetVisible( nMe, .f. )
|
||||
end if
|
||||
endif
|
||||
return
|
||||
|
||||
//-------------------------------------------------------------//
|
||||
@@ -136,20 +136,20 @@ return
|
||||
function Bunny_OnFirstFrame( )
|
||||
|
||||
if dd_isKeyPressed( 16 )
|
||||
plusVelo = 2
|
||||
plusVelo := 2
|
||||
else
|
||||
plusVelo = 1
|
||||
end if
|
||||
plusVelo := 1
|
||||
endif
|
||||
|
||||
dd_SPClearDirection( spBunny )
|
||||
|
||||
if dd_isKeyPressed( 39 )
|
||||
dd_SPSetDirection( spBunny, 6, 8 * plusVelo , 0 )
|
||||
end if
|
||||
endif
|
||||
|
||||
if dd_isKeyPressed( 37 )
|
||||
dd_SPSetDirection( spBunny, 4, -8 * plusVelo , 0 )
|
||||
end if
|
||||
endif
|
||||
|
||||
return
|
||||
|
||||
@@ -162,17 +162,17 @@ function ddOnRender()
|
||||
dd_SPClearDirection( spShots[ nShotsActive ] )
|
||||
dd_SPSetDirection( spShots[nShotsActive] , 6 , 0 , (-15) )
|
||||
|
||||
x = dd_SPGetX( spBunny )
|
||||
y = dd_SPGetY( spBunny )
|
||||
x := dd_SPGetX( spBunny )
|
||||
y := dd_SPGetY( spBunny )
|
||||
|
||||
dd_SPSetXY( spShots[nShotsActive], x, y - 20 )
|
||||
dd_SPSetVisible( spShots[nShotsActive], .t. )
|
||||
nShotsActive += 1
|
||||
if nShotsActive > 10
|
||||
nShotsActive = 1
|
||||
end if
|
||||
end if
|
||||
end if
|
||||
nShotsActive := 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
return
|
||||
|
||||
//-------------------------------------------------------------//
|
||||
|
||||
@@ -98,7 +98,7 @@ static function HB_TokenGet( cText, nPos, cSep )
|
||||
|
||||
local aTokens := HB_ATokens( cText, cSep )
|
||||
|
||||
return If( nPos <= Len( aTokens ), aTokens[ nPos ], "" )
|
||||
return iif( nPos <= Len( aTokens ), aTokens[ nPos ], "" )
|
||||
|
||||
#endif
|
||||
|
||||
@@ -114,8 +114,8 @@ static function ADO_NEW( nWA )
|
||||
|
||||
local aWAData := Array( WA_SIZE )
|
||||
|
||||
aWAData[ WA_BOF ] = .F.
|
||||
aWAData[ WA_EOF ] = .F.
|
||||
aWAData[ WA_BOF ] := .F.
|
||||
aWAData[ WA_EOF ] := .F.
|
||||
|
||||
USRRDD_AREADATA( nWA, aWAData )
|
||||
|
||||
@@ -177,24 +177,24 @@ static function ADO_CREATEFIELDS( nWA, aStruct )
|
||||
local aWAData := USRRDD_AREADATA( nWA )
|
||||
local n
|
||||
|
||||
aWAData[ WA_SQLSTRUCT ] = ""
|
||||
aWAData[ WA_SQLSTRUCT ] := ""
|
||||
|
||||
for n = 1 to Len( aStruct )
|
||||
if n > 1
|
||||
aWAData[ WA_SQLSTRUCT ] += ", "
|
||||
endif
|
||||
aWAData[ WA_SQLSTRUCT ] += "[" + aStruct[ n ][ DBS_NAME ] + "]"
|
||||
do case
|
||||
case aStruct[ n ][ DBS_TYPE ] $ "C,Character"
|
||||
aWAData[ WA_SQLSTRUCT ] += " CHAR(" + AllTrim( Str( aStruct[ n ][ DBS_LEN ] ) ) + ") NULL"
|
||||
|
||||
case aStruct[ n ][ DBS_TYPE ] == "N"
|
||||
aWAData[ WA_SQLSTRUCT ] += " NUMERIC(" + AllTrim( Str( aStruct[ n ][ DBS_LEN ] ) ) + ")"
|
||||
|
||||
case aStruct[ n ][ DBS_TYPE ] == "L"
|
||||
aWAData[ WA_SQLSTRUCT ] += " LOGICAL"
|
||||
endcase
|
||||
next
|
||||
for n := 1 to Len( aStruct )
|
||||
if n > 1
|
||||
aWAData[ WA_SQLSTRUCT ] += ", "
|
||||
endif
|
||||
aWAData[ WA_SQLSTRUCT ] += "[" + aStruct[ n ][ DBS_NAME ] + "]"
|
||||
do case
|
||||
case aStruct[ n ][ DBS_TYPE ] $ "C,Character"
|
||||
aWAData[ WA_SQLSTRUCT ] += " CHAR(" + AllTrim( Str( aStruct[ n ][ DBS_LEN ] ) ) + ") NULL"
|
||||
|
||||
case aStruct[ n ][ DBS_TYPE ] == "N"
|
||||
aWAData[ WA_SQLSTRUCT ] += " NUMERIC(" + AllTrim( Str( aStruct[ n ][ DBS_LEN ] ) ) + ")"
|
||||
|
||||
case aStruct[ n ][ DBS_TYPE ] == "L"
|
||||
aWAData[ WA_SQLSTRUCT ] += " LOGICAL"
|
||||
endcase
|
||||
next
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -210,13 +210,13 @@ static function ADO_OPEN( nWA, aOpenInfo )
|
||||
aOpenInfo[ UR_OI_ALIAS ] := cName
|
||||
endif
|
||||
|
||||
aWAData[ WA_CONNECTION ] = TOleAuto():New( "ADODB.Connection" )
|
||||
aWAData[ WA_TABLENAME ] = s_cTableName
|
||||
aWAData[ WA_QUERY ] = s_cQuery
|
||||
aWAData[ WA_USERNAME ] = s_cUserName
|
||||
aWAData[ WA_PASSWORD ] = s_cPassword
|
||||
aWAData[ WA_SERVER ] = s_cServer
|
||||
aWAData[ WA_ENGINE ] = s_cEngine
|
||||
aWAData[ WA_CONNECTION ] := TOleAuto():New( "ADODB.Connection" )
|
||||
aWAData[ WA_TABLENAME ] := s_cTableName
|
||||
aWAData[ WA_QUERY ] := s_cQuery
|
||||
aWAData[ WA_USERNAME ] := s_cUserName
|
||||
aWAData[ WA_PASSWORD ] := s_cPassword
|
||||
aWAData[ WA_SERVER ] := s_cServer
|
||||
aWAData[ WA_ENGINE ] := s_cEngine
|
||||
|
||||
do case
|
||||
case Lower( Right( aOpenInfo[ UR_OI_NAME ], 4 ) ) == ".mdb"
|
||||
@@ -252,7 +252,7 @@ static function ADO_OPEN( nWA, aOpenInfo )
|
||||
case aWAData[ WA_ENGINE ] == "ORACLE"
|
||||
aWAData[ WA_CONNECTION ]:Open( "Provider=MSDAORA.1;" + ;
|
||||
"Persist Security Info=False" + ;
|
||||
If( Empty( aWAData[ WA_SERVER ] ),;
|
||||
iif( Empty( aWAData[ WA_SERVER ] ),;
|
||||
"", ";Data source=" + aWAData[ WA_SERVER ] ) + ;
|
||||
";User ID=" + aWAData[ WA_USERNAME ] + ;
|
||||
";Password=" + aWAData[ WA_PASSWORD ] )
|
||||
@@ -260,13 +260,13 @@ static function ADO_OPEN( nWA, aOpenInfo )
|
||||
endcase
|
||||
|
||||
oRecordSet := TOleAuto():New( "ADODB.Recordset" )
|
||||
oRecordSet:CursorType = adOpenDynamic
|
||||
oRecordSet:CursorLocation = adUseClient
|
||||
oRecordSet:LockType = adLockPessimistic
|
||||
oRecordSet:CursorType := adOpenDynamic
|
||||
oRecordSet:CursorLocation := adUseClient
|
||||
oRecordSet:LockType := adLockPessimistic
|
||||
oRecordSet:Open( aWAData[ WA_QUERY ] + aWAData[ WA_TABLENAME ], aWAData[ WA_CONNECTION ] )
|
||||
|
||||
aWAData[ WA_CATALOG ] = TOleAuto():New( "ADOX.Catalog" )
|
||||
aWAData[ WA_CATALOG ]:ActiveConnection = aWAData[ WA_CONNECTION ]
|
||||
aWAData[ WA_CATALOG ] := TOleAuto():New( "ADOX.Catalog" )
|
||||
aWAData[ WA_CATALOG ]:ActiveConnection := aWAData[ WA_CONNECTION ]
|
||||
|
||||
if oRecordSet == NIL
|
||||
oError := ErrorNew()
|
||||
@@ -286,7 +286,7 @@ static function ADO_OPEN( nWA, aOpenInfo )
|
||||
|
||||
UR_SUPER_SETFIELDEXTENT( nWA, nTotalFields := oRecordSet:Fields:Count )
|
||||
|
||||
FOR n = 1 TO nTotalFields
|
||||
FOR n := 1 TO nTotalFields
|
||||
aField := ARRAY( UR_FI_SIZE )
|
||||
aField[ UR_FI_NAME ] := oRecordSet:Fields( n - 1 ):Name
|
||||
aField[ UR_FI_TYPE ] := ADO_GETFIELDTYPE( oRecordSet:Fields( n - 1 ):Type )
|
||||
@@ -338,7 +338,7 @@ static function ADO_GOTOID( nWA, nRecord )
|
||||
endif
|
||||
ADO_RECID( nWA, @nRecNo )
|
||||
|
||||
RETURN If( nRecord == nRecNo, SUCCESS, FAILURE )
|
||||
RETURN iif( nRecord == nRecNo, SUCCESS, FAILURE )
|
||||
|
||||
static function ADO_GOTOP( nWA )
|
||||
|
||||
@@ -349,8 +349,8 @@ static function ADO_GOTOP( nWA )
|
||||
oRecordSet:MoveFirst()
|
||||
endif
|
||||
|
||||
aWAData[ WA_BOF ] = .F.
|
||||
aWAData[ WA_EOF ] = .F.
|
||||
aWAData[ WA_BOF ] := .F.
|
||||
aWAData[ WA_EOF ] := .F.
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -361,8 +361,8 @@ static function ADO_GOBOTTOM( nWA )
|
||||
|
||||
oRecordSet:MoveLast()
|
||||
|
||||
aWAData[ WA_BOF ] = .F.
|
||||
aWAData[ WA_EOF ] = .F.
|
||||
aWAData[ WA_BOF ] := .F.
|
||||
aWAData[ WA_EOF ] := .F.
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -438,7 +438,7 @@ static function ADO_RECID( nWA, nRecNo )
|
||||
|
||||
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
|
||||
|
||||
nRecno := If( oRecordSet:AbsolutePosition == -3, oRecordSet:RecordCount() + 1, oRecordSet:AbsolutePosition )
|
||||
nRecno := iif( oRecordSet:AbsolutePosition == -3, oRecordSet:RecordCount() + 1, oRecordSet:AbsolutePosition )
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -499,9 +499,9 @@ static function ADO_ORDINFO( nWA, nIndex, aOrderInfo )
|
||||
do case
|
||||
case nIndex == UR_ORI_TAG
|
||||
if aOrderInfo[ UR_ORI_TAG ] < aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count
|
||||
aOrderInfo[ UR_ORI_RESULT ] = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( aOrderInfo[ UR_ORI_TAG ] ):Name
|
||||
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( aOrderInfo[ UR_ORI_TAG ] ):Name
|
||||
else
|
||||
aOrderInfo[ UR_ORI_RESULT ] = ""
|
||||
aOrderInfo[ UR_ORI_RESULT ] := ""
|
||||
endif
|
||||
endcase
|
||||
|
||||
@@ -544,7 +544,7 @@ static function ADO_SETFILTER( nWA, aFilterInfo )
|
||||
|
||||
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
|
||||
|
||||
oRecordSet:Filter = SQLTranslate( aFilterInfo[ UR_FRI_CEXPR ] )
|
||||
oRecordSet:Filter := SQLTranslate( aFilterInfo[ UR_FRI_CEXPR ] )
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -553,7 +553,7 @@ static function ADO_CLEARFILTER( nWA )
|
||||
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
|
||||
|
||||
TRY
|
||||
oRecordSet:Filter = ""
|
||||
oRecordSet:Filter := ""
|
||||
CATCH
|
||||
END
|
||||
|
||||
@@ -579,9 +579,9 @@ static function ADO_SETLOCATE( nWA, aScopeInfo )
|
||||
|
||||
local aWAData := USRRDD_AREADATA( nWA )
|
||||
|
||||
aScopeInfo[ UR_SI_CFOR ] = SQLTranslate( aWAData[ WA_LOCATEFOR ] )
|
||||
aScopeInfo[ UR_SI_CFOR ] := SQLTranslate( aWAData[ WA_LOCATEFOR ] )
|
||||
|
||||
aWAData[ WA_SCOPEINFO ] = aScopeInfo
|
||||
aWAData[ WA_SCOPEINFO ] := aScopeInfo
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -590,9 +590,9 @@ static function ADO_LOCATE( nWA, lContinue )
|
||||
local aWAData := USRRDD_AREADATA( nWA )
|
||||
local oRecordSet := aWAData[ WA_RECORDSET ]
|
||||
|
||||
oRecordSet:Find( aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ], If( lContinue, 1, 0 ) )
|
||||
oRecordSet:Find( aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ], iif( lContinue, 1, 0 ) )
|
||||
USRRDD_SETFOUND( nWA, ! oRecordSet:EOF )
|
||||
aWAData[ WA_EOF ] = oRecordSet:EOF
|
||||
aWAData[ WA_EOF ] := oRecordSet:EOF
|
||||
|
||||
return SUCCESS
|
||||
|
||||
@@ -605,13 +605,13 @@ static function ADO_CLEARREL( nWA )
|
||||
|
||||
if aWAData[ WA_CATALOG ] != nil .and. aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys != nil
|
||||
TRY
|
||||
nKeys = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys:Count
|
||||
nKeys := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys:Count
|
||||
CATCH
|
||||
END
|
||||
endif
|
||||
|
||||
if nKeys > 0
|
||||
cKeyName = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nKeys - 1 ):Name
|
||||
cKeyName := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nKeys - 1 ):Name
|
||||
if Upper( cKeyName ) != "PRIMARYKEY"
|
||||
aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys:Delete( cKeyName )
|
||||
endif
|
||||
@@ -624,7 +624,7 @@ static function ADO_RELAREA( nWA, nRelNo, nRelArea )
|
||||
local aWAData := USRRDD_AREADATA( nWA )
|
||||
|
||||
if nRelNo <= aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys:Count()
|
||||
nRelArea = Select( aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nRelNo - 1 ):RelatedTable )
|
||||
nRelArea := Select( aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nRelNo - 1 ):RelatedTable )
|
||||
endif
|
||||
|
||||
return SUCCESS
|
||||
@@ -634,7 +634,7 @@ static function ADO_RELTEXT( nWA, nRelNo, cExpr )
|
||||
local aWAData := USRRDD_AREADATA( nWA )
|
||||
|
||||
if nRelNo <= aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys:Count()
|
||||
cExpr = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nRelNo - 1 ):Columns( 0 ):RelatedColumn
|
||||
cExpr := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Keys( nRelNo - 1 ):Columns( 0 ):RelatedColumn
|
||||
endif
|
||||
|
||||
return SUCCESS
|
||||
@@ -660,7 +660,7 @@ static function ADO_ORDLSTADD( nWA, aOrderInfo )
|
||||
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
|
||||
|
||||
TRY
|
||||
oRecordSet:Index = aOrderInfo[ UR_ORI_BAG ]
|
||||
oRecordSet:Index := aOrderInfo[ UR_ORI_BAG ]
|
||||
CATCH
|
||||
END
|
||||
|
||||
@@ -671,7 +671,7 @@ static function ADO_ORDLSTCLEAR( nWA )
|
||||
local oRecordSet := USRRDD_AREADATA( nWA )[ WA_RECORDSET ]
|
||||
|
||||
TRY
|
||||
oRecordSet:Index = ""
|
||||
oRecordSet:Index := ""
|
||||
CATCH
|
||||
END
|
||||
|
||||
@@ -683,10 +683,10 @@ static function ADO_ORDCREATE( nWA, aOrderCreateInfo )
|
||||
local oIndex, oError, n, lFound := .f.
|
||||
|
||||
if aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes != nil
|
||||
for n = 1 to aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count
|
||||
oIndex = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( n - 1 )
|
||||
if oIndex:Name == If( ! Empty( aOrderCreateInfo[ UR_ORCR_TAGNAME ] ), aOrderCreateInfo[ UR_ORCR_TAGNAME ], aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
lFound = .T.
|
||||
for n := 1 to aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count
|
||||
oIndex := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( n - 1 )
|
||||
if oIndex:Name == iif( ! Empty( aOrderCreateInfo[ UR_ORCR_TAGNAME ] ), aOrderCreateInfo[ UR_ORCR_TAGNAME ], aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
lFound := .T.
|
||||
exit
|
||||
endif
|
||||
next
|
||||
@@ -694,10 +694,10 @@ static function ADO_ORDCREATE( nWA, aOrderCreateInfo )
|
||||
|
||||
TRY
|
||||
if aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes == nil .or. ! lFound
|
||||
oIndex = TOleAuto():New( "ADOX.Index" )
|
||||
oIndex:Name = If( ! Empty( aOrderCreateInfo[ UR_ORCR_TAGNAME ] ), aOrderCreateInfo[ UR_ORCR_TAGNAME ], aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
oIndex:PrimaryKey = .F.
|
||||
oIndex:Unique = aOrderCreateInfo[ UR_ORCR_UNIQUE ]
|
||||
oIndex := TOleAuto():New( "ADOX.Index" )
|
||||
oIndex:Name := iif( ! Empty( aOrderCreateInfo[ UR_ORCR_TAGNAME ] ), aOrderCreateInfo[ UR_ORCR_TAGNAME ], aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
oIndex:PrimaryKey := .F.
|
||||
oIndex:Unique := aOrderCreateInfo[ UR_ORCR_UNIQUE ]
|
||||
oIndex:Columns:Append( aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Append( oIndex )
|
||||
endif
|
||||
@@ -719,8 +719,8 @@ static function ADO_ORDDESTROY( nWA, aOrderInfo )
|
||||
local aWAData := USRRDD_AREADATA( nWA ), n, oIndex
|
||||
|
||||
if aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes != nil
|
||||
for n = 1 to aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count
|
||||
oIndex = aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( n - 1 )
|
||||
for n := 1 to aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count
|
||||
oIndex := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( n - 1 )
|
||||
if oIndex:Name == aOrderInfo[ UR_ORI_TAG ]
|
||||
aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Delete( oIndex:Name )
|
||||
endif
|
||||
@@ -916,31 +916,31 @@ return nDBFFieldType
|
||||
|
||||
function HB_AdoSetTable( cTableName )
|
||||
|
||||
s_cTableName = cTableName
|
||||
s_cTableName := cTableName
|
||||
|
||||
return nil
|
||||
|
||||
function HB_AdoSetEngine( cEngine )
|
||||
|
||||
s_cEngine = cEngine
|
||||
s_cEngine := cEngine
|
||||
|
||||
return nil
|
||||
|
||||
function HB_AdoSetServer( cServer )
|
||||
|
||||
s_cServer = cServer
|
||||
s_cServer := cServer
|
||||
|
||||
return nil
|
||||
|
||||
function HB_AdoSetUser( cUser )
|
||||
|
||||
s_cUserName = cUser
|
||||
s_cUserName := cUser
|
||||
|
||||
return nil
|
||||
|
||||
function HB_AdoSetPassword( cPassword )
|
||||
|
||||
s_cPassword = cPassword
|
||||
s_cPassword := cPassword
|
||||
|
||||
return nil
|
||||
|
||||
@@ -948,30 +948,30 @@ function HB_AdoSetQuery( cQuery )
|
||||
|
||||
DEFAULT cQuery TO "SELECT * FROM "
|
||||
|
||||
s_cQuery = cQuery
|
||||
s_cQuery := cQuery
|
||||
|
||||
return nil
|
||||
|
||||
function HB_AdoSetLocateFor( cLocateFor )
|
||||
|
||||
USRRDD_AREADATA( Select() )[ WA_LOCATEFOR ] = cLocateFor
|
||||
USRRDD_AREADATA( Select() )[ WA_LOCATEFOR ] := cLocateFor
|
||||
|
||||
return nil
|
||||
|
||||
static function SQLTranslate( cExpr )
|
||||
|
||||
if Left( cExpr, 1 ) == '"' .and. Right( cExpr, 1 ) == '"'
|
||||
cExpr = SubStr( cExpr, 2, Len( cExpr ) - 2 )
|
||||
endif
|
||||
|
||||
cExpr = StrTran( cExpr, '""', "" )
|
||||
cExpr = StrTran( cExpr, '"', "'" )
|
||||
cExpr = StrTran( cExpr, "''", "'" )
|
||||
cExpr = StrTran( cExpr, "==", "=" )
|
||||
cExpr = StrTran( cExpr, ".and.", "AND" )
|
||||
cExpr = StrTran( cExpr, ".or.", "OR" )
|
||||
cExpr = StrTran( cExpr, ".AND.", "AND" )
|
||||
cExpr = StrTran( cExpr, ".OR.", "OR" )
|
||||
if Left( cExpr, 1 ) == '"' .and. Right( cExpr, 1 ) == '"'
|
||||
cExpr := SubStr( cExpr, 2, Len( cExpr ) - 2 )
|
||||
endif
|
||||
|
||||
cExpr := StrTran( cExpr, '""', "" )
|
||||
cExpr := StrTran( cExpr, '"', "'" )
|
||||
cExpr := StrTran( cExpr, "''", "'" )
|
||||
cExpr := StrTran( cExpr, "==", "=" )
|
||||
cExpr := StrTran( cExpr, ".and.", "AND" )
|
||||
cExpr := StrTran( cExpr, ".or.", "OR" )
|
||||
cExpr := StrTran( cExpr, ".AND.", "AND" )
|
||||
cExpr := StrTran( cExpr, ".OR.", "OR" )
|
||||
|
||||
return cExpr
|
||||
|
||||
@@ -993,8 +993,6 @@ function HB_AdoRddGetRecordSet( nWA )
|
||||
|
||||
DEFAULT nWA TO Select()
|
||||
|
||||
aWAData = USRRDD_AREADATA( nWA )
|
||||
|
||||
return If( aWAData != nil, aWAData[ WA_RECORDSET ], nil )
|
||||
|
||||
aWAData := USRRDD_AREADATA( nWA )
|
||||
|
||||
return iif( aWAData != nil, aWAData[ WA_RECORDSET ], nil )
|
||||
|
||||
@@ -13,21 +13,21 @@ function Main()
|
||||
USE test2.mdb VIA "ADORDD" TABLE "table1"
|
||||
|
||||
APPEND BLANK
|
||||
test2->First = "Homer"
|
||||
test2->Last = "Simpson"
|
||||
test2->Age = 45
|
||||
test2->First := "Homer"
|
||||
test2->Last := "Simpson"
|
||||
test2->Age := 45
|
||||
|
||||
APPEND BLANK
|
||||
test2->First = "Lara"
|
||||
test2->Last = "Croft"
|
||||
test2->Age = 32
|
||||
test2->First := "Lara"
|
||||
test2->Last := "Croft"
|
||||
test2->Age := 32
|
||||
|
||||
|
||||
GO TOP
|
||||
Browse()
|
||||
|
||||
GO TOP
|
||||
locate for TEST2->First="Lara"
|
||||
locate for TEST2->First = "Lara"
|
||||
? FOUND()
|
||||
USE
|
||||
|
||||
|
||||
@@ -675,8 +675,8 @@ METHOD CodeWindowProcessKey( nKey ) CLASS HBDebugger
|
||||
CASE nKey == K_END .OR. nKey == K_CTRL_PGDN .OR. nKey == K_CTRL_END
|
||||
|
||||
::oBrwText:GoBottom()
|
||||
::oBrwText:nCol = ::oWndCode:nLeft + 1
|
||||
::oBrwText:nFirstCol = ::oWndCode:nLeft + 1
|
||||
::oBrwText:nCol := ::oWndCode:nLeft + 1
|
||||
::oBrwText:nFirstCol := ::oWndCode:nLeft + 1
|
||||
SetPos( Row(), ::oWndCode:nLeft + 1 )
|
||||
IF ::oWndCode:lFocused
|
||||
SetCursor( SC_SPECIAL1 )
|
||||
|
||||
@@ -85,7 +85,7 @@ function _sx_INIinit( nArea )
|
||||
* by workarea number. In Harbour we are using hash arrays.
|
||||
*/
|
||||
|
||||
if Type( "SxIniInfo" ) = "U"
|
||||
if Type( "SxIniInfo" ) = "U" /* NOTE: Intentionally using '=' operator */
|
||||
public SxIniInfo := {=>}
|
||||
HB_HCaseMatch( SxIniInfo, .f. )
|
||||
HB_HAutoAdd( SxIniInfo, HB_HAUTOADD_ASSIGN )
|
||||
|
||||
@@ -170,7 +170,7 @@ PROCEDURE _APPMAIN( cFile, ... )
|
||||
|
||||
IF s_nRow >= MaxRow()
|
||||
Scroll( 2, 0, MaxRow(), MaxCol(), 1 )
|
||||
s_nRow = MaxRow() - 1
|
||||
s_nRow := MaxRow() - 1
|
||||
ENDIF
|
||||
|
||||
ENDDO
|
||||
|
||||
@@ -220,7 +220,7 @@ STATIC PROCEDURE WriteSymbol( nOutput, cLine )
|
||||
STATIC aNames := { "MAIN" } // Init with names you want to skip
|
||||
|
||||
IF len( cLine ) > 0
|
||||
cLine = upper( cLine )
|
||||
cLine := upper( cLine )
|
||||
IF ASCAN( aNames, {|c| c == cLine } ) == 0
|
||||
AADD( aNames, cLine )
|
||||
FWRITE( nOutput, "EXTERNAL " +cLine + EOL )
|
||||
|
||||
Reference in New Issue
Block a user