2012-11-26 15:25 UTC+0100 Viktor Szakats (harbour syenar.net)
* src/rtl/dbedit.prg
+ also accept function pointers as user functions
(not just codeblocks and macro strings)
* src/rtl/achoice.prg
+ ACHOICE() now supports the Harbour extension similar to
DBEDIT() where codeblocks and function pointers are
also accepted instead of macro strings for the <xSelect>
parameter that controls permission for items.
* src/rtl/browse.prg
* contrib/hbwin/wapi_shellapi.c
* minor
This commit is contained in:
@@ -10,6 +10,21 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2012-11-26 15:25 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* src/rtl/dbedit.prg
|
||||
+ also accept function pointers as user functions
|
||||
(not just codeblocks and macro strings)
|
||||
|
||||
* src/rtl/achoice.prg
|
||||
+ ACHOICE() now supports the Harbour extension similar to
|
||||
DBEDIT() where codeblocks and function pointers are
|
||||
also accepted instead of macro strings for the <xSelect>
|
||||
parameter that controls permission for items.
|
||||
|
||||
* src/rtl/browse.prg
|
||||
* contrib/hbwin/wapi_shellapi.c
|
||||
* minor
|
||||
|
||||
2012-11-26 14:43 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* contrib/xhb/xhberr.prg
|
||||
% optimized hb_macroBlock() calls to __dynsN2Sym() calls.
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
HB_FUNC( WAPI_SHELLEXECUTE )
|
||||
{
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
hb_retni( -1 );
|
||||
hb_retnint( -1 );
|
||||
#else
|
||||
void * hOperation;
|
||||
void * hFile;
|
||||
@@ -74,10 +74,10 @@ HB_FUNC( WAPI_SHELLEXECUTE )
|
||||
HB_PARSTR( 5, &hDirectory, NULL ),
|
||||
hb_parnidef( 6, SW_SHOWNORMAL ) /* nShowCmd */ ) );
|
||||
|
||||
hb_strfree( hOperation );
|
||||
hb_strfree( hFile );
|
||||
hb_strfree( hOperation );
|
||||
hb_strfree( hFile );
|
||||
hb_strfree( hParameters );
|
||||
hb_strfree( hDirectory );
|
||||
hb_strfree( hDirectory );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
#define INRANGE( xLo, xVal, xHi ) ( xVal >= xLo .AND. xVal <= xHi )
|
||||
#define BETWEEN( xLo, xVal, xHi ) Min( Max( xLo, xVal ), xHi )
|
||||
|
||||
/* NOTE: Extension: Harbour supports codeblocks and function pointers
|
||||
as the xSelect parameter (both when supplied as is, or as an
|
||||
array of codeblocks). [vszakats] */
|
||||
|
||||
FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPos, nHiLiteRow )
|
||||
|
||||
LOCAL nNumCols // Number of columns in the window
|
||||
@@ -669,7 +673,9 @@ STATIC FUNCTION Ach_Select( alSelect, nPos )
|
||||
|
||||
IF nPos >= 1 .AND. nPos <= Len( alSelect )
|
||||
sel := alSelect[ nPos ]
|
||||
IF HB_ISSTRING( sel ) .AND. ! Empty( sel )
|
||||
IF HB_ISEVALITEM( sel )
|
||||
sel := Eval( sel )
|
||||
ELSEIF HB_ISSTRING( sel ) .AND. ! Empty( sel )
|
||||
sel := Eval( hb_macroBlock( sel ) )
|
||||
ENDIF
|
||||
IF HB_ISLOGICAL( sel )
|
||||
|
||||
@@ -350,7 +350,7 @@ STATIC FUNCTION DoGet( oBrw, lAppend )
|
||||
! Eval( hb_macroBlock( cForExp ) )
|
||||
dbGoTop()
|
||||
ENDIF
|
||||
IF ! lAppend .AND. ! Empty( cIndexKey ) .AND. ! xKeyValue == Eval( bIndexKey )
|
||||
IF ! lAppend .AND. ! Empty( bIndexKey ) .AND. ! xKeyValue == Eval( bIndexKey )
|
||||
lSuccess := .T.
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
|
||||
/* NOTE: Extension: Harbour supports codeblocks as the xUserFunc parameter
|
||||
[vszakats] */
|
||||
/* NOTE: Extension: Harbour supports codeblocks and function pointers
|
||||
as the xUserFunc parameter. [vszakats] */
|
||||
/* NOTE: Clipper is buggy and will throw an error if the number of
|
||||
columns is zero. (Check: dbEdit(0,0,20,20,{})) [vszakats] */
|
||||
/* NOTE: Clipper will throw an error if there's no database open [vszakats] */
|
||||
@@ -312,7 +312,7 @@ STATIC FUNCTION CallUser( oBrowse, xUserFunc, nKey, lAppend, lFlag )
|
||||
/* NOTE: CA-Cl*pper won't check the type of the return value here,
|
||||
and will crash if it's a non-NIL, non-numeric type. We're
|
||||
replicating this behavior. */
|
||||
nAction := iif( HB_ISBLOCK( xUserFunc ), ;
|
||||
nAction := iif( HB_ISEVALITEM( xUserFunc ), ;
|
||||
Eval( xUserFunc, nMode, oBrowse:colPos ), ;
|
||||
iif( HB_ISSTRING( xUserFunc ) .AND. ! Empty( xUserFunc ), ;
|
||||
&xUserFunc( nMode, oBrowse:colPos ), ; /* NOTE: Macro operator! */
|
||||
|
||||
Reference in New Issue
Block a user