Spinner Get
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Spinner Get
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 ?
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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Spinner Get
@ 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
ON DOWN aGet[ 4 ]:VarPut( nPuntataIniziale-=0.50 ) MIN 0,50 MAX 200 RIGHTTOLEFT
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Spinner Get
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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
Re: Spinner Get
Intenta asi:
Regards, saludos.
Code: Select all | Expand
#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
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- alerchster
- Posts: 95
- Joined: Mon Oct 22, 2012 4:43 pm
Re: Spinner Get
@ 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
ON DOWN 0.50 MIN 0,50 MAX 200 RIGHTTOLEFT
Code: Select all | Expand
@ 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
Ing. Anton Lerchster
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Spinner Get
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: Select all | Expand
@ 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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Spinner Get
make errorkarinha wrote:Intenta asi:
Regards, saludos.Code: Select all | Expand
#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
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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Spinner Get
I resolve with
Code: Select all | Expand
@ 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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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