Spinner Get

Spinner Get

Postby Silvio.Falconi » Mon Oct 14, 2024 9: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 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Spinner Get

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Spinner Get

Postby Silvio.Falconi » 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 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Spinner Get

Postby karinha » Mon Oct 14, 2024 1:18 pm

Intenta asi:

Code: Select all  Expand view  RUN

#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
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Spinner Get

Postby alerchster » Mon Oct 14, 2024 2: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: Select all  Expand view  RUN

@ 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
User avatar
alerchster
 
Posts: 95
Joined: Mon Oct 22, 2012 4:43 pm

Re: Spinner Get

Postby Silvio.Falconi » Tue Oct 15, 2024 8: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: Select all  Expand view  RUN

@ 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Spinner Get

Postby Silvio.Falconi » Tue Oct 15, 2024 8:23 am

karinha wrote:Intenta asi:

Code: Select all  Expand view  RUN

#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 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: Spinner Get

Postby Silvio.Falconi » Tue Oct 15, 2024 8:31 am

I resolve with

Code: Select all  Expand view  RUN

@ 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
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests