FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Spinner Get
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Spinner Get
Posted: Mon Oct 14, 2024 09:41 AM

I have a Spinner get

nPuntataIniziale := 0.50

@ nRow,nCol SAY oSay[1] PROMPT "Puntata iniziale" SIZE 100,24 PIXEL OF oDlg FONT oFont

@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP nPuntataIniziale+=0.50;

    ON DOWN nPuntataIniziale-=0.50  MIN 0,50 MAX 200 RIGHTTOLEFT

I tried laso with

@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP 0.50;

    ON DOWN 0.50  MIN 0,50 MAX 200 RIGHTTOLEFT

but not run

I wish the final user can press the spinner and add/ minus 0.50 on nPuntataIniziale min 0.50 max 200 , so where is the error ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Spinner Get
Posted: Mon Oct 14, 2024 10:18 AM

@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP aGet[ 4 ]:VarPut( nPuntataIniziale+=0.50 ) ;

ON DOWN aGet[ 4 ]:VarPut( nPuntataIniziale-=0.50 ) MIN 0,50 MAX 200 RIGHTTOLEFT

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Spinner Get
Posted: Mon Oct 14, 2024 12:36 PM
Antonio Linares wrote:@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP aGet[ 4 ]:VarPut( nPuntataIniziale+=0.50 ) ;
ON DOWN aGet[ 4 ]:VarPut( nPuntataIniziale-=0.50 ) MIN 0,50 MAX 200 RIGHTTOLEFT

@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg;
FONT oFont SPINNER ;
ON UP aGet[ 4 ]:VarPut( nPuntataIniziale+=0.50 ) ;
ON DOWN aGet[ 4 ]:VarPut( nPuntataIniziale-=0.50 ) ;
MIN 0,50 MAX 200 RIGHTTOLEFT


Compiling 'test.prg'...
test.prg(89) Error E0030 Syntax error "syntax error at '@'"
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Spinner Get
Posted: Mon Oct 14, 2024 01:18 PM
Intenta asi:
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "Constant.ch"

   @ 100, 10 GET aGet[4] VAR nPuntataIniziale SPINNER MIN 0.50 MAX 200 ;
      ON UP   GetStep( aGet[4]:VarPut( nPuntataIniziale += 0.50 ) )    ;
      ON DOWN GetStep( aGet[4]:VarPut( nPuntataIniziale -= 0.50 ) )    ;
      SIZE 90, 24 RIGHTTOLEFT PIXEL OF oDlg PICTURE "9999.99" UPDATE
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 137
Joined: Mon Oct 22, 2012 04:43 PM
Re: Spinner Get
Posted: Mon Oct 14, 2024 02:59 PM
@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP 0.50;
ON DOWN 0.50 MIN 0,50 MAX 200 RIGHTTOLEFT
Code (fw): Select all Collapse
@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER MIN 0.50 MAX 200 ;
     ON UP   GetStep( cGet,  0.50 ) ;
     ON DOWN GetStep( cGet, -0.50 ) ;
     RIGHTTOLEFT PICTURE "999.99" UPDATE
....

static function GetStep( oGet, nAdd )
   local nValue   := oGet:Value + nAdd
   nValue   := Max( Min( nValue, Eval( oGet:bMax ) ), Eval( oGet:bMin ) )
   oGet:cText  := nValue
   XEval( oGet:bChange )
return nil
Regards



Ing. Anton Lerchster
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Spinner Get
Posted: Tue Oct 15, 2024 08:22 AM
alerchster wrote:@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER ON UP 0.50;
ON DOWN 0.50 MIN 0,50 MAX 200 RIGHTTOLEFT
Code (fw): Select all Collapse
@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER MIN 0.50 MAX 200 ;
     ON UP   GetStep( cGet,  0.50 ) ;
     ON DOWN GetStep( cGet, -0.50 ) ;
     RIGHTTOLEFT PICTURE "999.99" UPDATE
....

static function GetStep( oGet, nAdd )
   local nValue   := oGet:Value + nAdd
   nValue   := Max( Min( nValue, Eval( oGet:bMax ) ), Eval( oGet:bMin ) )
   oGet:cText  := nValue
   XEval( oGet:bChange )
return nil


@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER MIN 0.50 MAX 200 ;
ON UP GetStep( aGet[4], 0.50 ) ;
ON DOWN GetStep( aGet[4], -0.50 ) ;
RIGHTTOLEFT PICTURE "999.99" UPDATE

make error
Error occurred at: 10/15/24, 10:21:34
Error description: Error BASE/1004 No exported method: EVAL
Args:
[ 1] = U

Stack Calls
===========
Called from: test.prg => (b)EVAL( 0 )
Called from: test.prg => GETSTEP( 138 )
Called from: test.prg => (b)PROGRESSIONI( 91 )
Called from: .\source\classes\tget.prg => (b)TGET_SPINNER( 3429 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Spinner Get
Posted: Tue Oct 15, 2024 08:23 AM
karinha wrote:Intenta asi:
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "Constant.ch"

   @ 100, 10 GET aGet[4] VAR nPuntataIniziale SPINNER MIN 0.50 MAX 200 ;
      ON UP   GetStep( aGet[4]:VarPut( nPuntataIniziale += 0.50 ) )    ;
      ON DOWN GetStep( aGet[4]:VarPut( nPuntataIniziale -= 0.50 ) )    ;
      SIZE 90, 24 RIGHTTOLEFT PIXEL OF oDlg PICTURE "9999.99" UPDATE
Regards, saludos.
make error
Error description: Error BASE/1004 No exported method: VALUE
Args:
[ 1] = N 5.00

Stack Calls
===========
Called from: test.prg => VALUE( 0 )
Called from: test.prg => GETSTEP( 141 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Spinner Get
Posted: Tue Oct 15, 2024 08:31 AM
I resolve with
Code (fw): Select all Collapse
@ nRow,nCol+150 GET aGet[4] VAR nPuntataIniziale SIZE 90,20 PIXEL OF oDlg FONT oFont SPINNER MIN 0.50 MAX 200 ;
     ON UP   GetStep(  aGet[4],  0.50,1,200 ) ;
     ON DOWN GetStep(  aGet[4], -0.50,1,200 ) ;
     RIGHTTOLEFT PICTURE "999.99" UPDATE

 static function GetStep( oGet, nAdd,nMin,nMax )
   local nValue   := oGet:Value + nAdd
   // nValue   := Max( Min( nValue, Eval( oGet:bMax ) ), Eval( oGet:bMin ) )

      nValue   := Max( Min( nValue, nMax ), nMin )
   oGet:cText  := nValue
   XEval( oGet:bChange )
return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion