Progress with error

Progress with error

Postby marca » Wed Jun 08, 2022 2:31 pm

Exact example of the problem



I changed the array to a value of 168 elements and had it run


function Main()

local oDlg, oProg1, oProg2

DEFINE DIALOG oDlg TITLE "Progress Bars"

@ 1, 1 PROGRESS oProg1 SIZE 80, 12

@ 1, 20 PROGRESS oProg2 SIZE 12, 50 VERTICAL

@ 3, 9 BUTTON "Ok" ACTION oDlg:End()

oDlg:bStart = { || Increase( oProg1, oProg2 ) }

ACTIVATE DIALOG oDlg CENTER ;
ON INIT ( oProg1:SetRange( 0, 168 ), oProg1:SetStep( 1 ),;
oProg2:SetRange( 0, 168 ), oProg2:SetStep( 1 ) )

return nil

function Increase( oProg1, oProg2 )

local n

for n = 1 to 168 // 111
// oProg1:StepIt()
// oProg2:StepIt()
oProg1:SetPos( n )
oProg2:SetPos( n )
Sleep( 50 )
SysRefresh()
next
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
marca
 
Posts: 117
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Re: Progress with error

Postby cmsoft » Wed Jun 08, 2022 3:42 pm

Marcelo:
What is the problem that gives you?
The size of is different, one is 50 and the other is 80...
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Progress with error

Postby marca » Wed Jun 08, 2022 3:59 pm

cmsoft wrote:Marcelo:
What is the problem that gives you?
The size of is different, one is 50 and the other is 80...

hello Cesar
Sleep( 50 ) does not interfere with anything can remove the problem continues.
The bar does not complete
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
marca
 
Posts: 117
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Re: Progress with error

Postby cmsoft » Wed Jun 08, 2022 4:00 pm

Prueba si te sirve des esta forma, usando METER
Code: Select all  Expand view

#include "fivewin.ch"

function Main()

local oDlg, oProg1, oProg2, i := 0

DEFINE DIALOG oDlg TITLE "Progress Bars" FROM 05,18 TO 17,62

//@ 1, 1 PROGRESS oProg1 SIZE 50, 12

@ 05,10 METER oProg1 VAR i TOTAL 168 OF oDlg SIZE 90,12 NOPERCENTAGE;
      BARCOLOR nRGB(105,98,255),nRGB(0,0,0) PIXEL

@ 20,50 METER oProg2 VAR i TOTAL 168 OF oDlg SIZE 50,50 CIRCULAR NOPERCENTAGE;
      BARCOLOR nRGB(155,20,255),nRGB(0,0,0)  PIXEL

//@ 1, 20 PROGRESS oProg2 SIZE 12, 50 VERTICAL

@ 75, 70 BUTTON "Ok" ACTION oDlg:End() PIXEL

oDlg:bStart = { || Increase( oProg1, oProg2 ) }

ACTIVATE DIALOG oDlg CENTER

return nil

function Increase( oProg1, oProg2 )

local n
oProg1:Set(0)
oProg2:Set(0)
for n = 1 to 168 // 111
// oProg1:StepIt()
// oProg2:StepIt()
oProg1:Set( n )
oProg2:Set( n )
Sleep( 20 )
SysRefresh()
next
RETURN nil
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Progress with error

Postby marca » Wed Jun 08, 2022 7:16 pm

cmsoft wrote:Prueba si te sirve des esta forma, usando METER
Code: Select all  Expand view

#include "fivewin.ch"

function Main()

local oDlg, oProg1, oProg2, i := 0

DEFINE DIALOG oDlg TITLE "Progress Bars" FROM 05,18 TO 17,62

//@ 1, 1 PROGRESS oProg1 SIZE 50, 12

@ 05,10 METER oProg1 VAR i TOTAL 168 OF oDlg SIZE 90,12 NOPERCENTAGE;
      BARCOLOR nRGB(105,98,255),nRGB(0,0,0) PIXEL

@ 20,50 METER oProg2 VAR i TOTAL 168 OF oDlg SIZE 50,50 CIRCULAR NOPERCENTAGE;
      BARCOLOR nRGB(155,20,255),nRGB(0,0,0)  PIXEL

//@ 1, 20 PROGRESS oProg2 SIZE 12, 50 VERTICAL

@ 75, 70 BUTTON "Ok" ACTION oDlg:End() PIXEL

oDlg:bStart = { || Increase( oProg1, oProg2 ) }

ACTIVATE DIALOG oDlg CENTER

return nil

function Increase( oProg1, oProg2 )

local n
oProg1:Set(0)
oProg2:Set(0)
for n = 1 to 168 // 111
// oProg1:StepIt()
// oProg2:StepIt()
oProg1:Set( n )
oProg2:Set( n )
Sleep( 20 )
SysRefresh()
next
RETURN nil




Meter I know it works I want to use progress which is newer
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
marca
 
Posts: 117
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Re: Progress with error

Postby Enrico Maria Giordano » Wed Jun 08, 2022 8:43 pm

marca wrote:The bar does not complete


Your sample works perfectly right here using latest FWH version.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8707
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Progress with error

Postby cmsoft » Wed Jun 08, 2022 10:15 pm

A mi tambien me funciona bien tu ejemplo
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Progress with error

Postby marca » Thu Jun 09, 2022 2:55 pm

Enrico Maria Giordano wrote:
marca wrote:The bar does not complete


Your sample works perfectly right here using latest FWH version.

EMG


I don't know how to put the image here but mine is missing a part of the bar to fill.
My version is 1402
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
marca
 
Posts: 117
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Re: Progress with error

Postby karinha » Thu Jun 09, 2022 7:05 pm

Code: Select all  Expand view

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL oDlg, oProg1, oProg2, i := 0

   DEFINE DIALOG oDlg TITLE "Progress Bars" FROM 05, 18 TO 17, 62

   @05, 10 METEREX oProg1 VAR I OF oDlg SIZE 90, 12 PIXEL TOTAL 100 ROUND ROUNDSIZE 6  ;
      GRADIENT CHUNK { { 1/2, nRGB( 255, 251, 229 ), nRGB( 250, 223, 143 ) } , ;
                       { 1/2, nRGB( 244, 194,  51 ), nRGB( 252, 235,  173 ) } };
      GRADIENT TRACK { { 1/2, nRGB( 198, 203, 213 ), nRGB( 219, 224, 233 ) },  ;
                       { 1/2, nRGB( 224, 238, 237 ), nRGB( 224, 238,237 ) } }


   @20, 50 METEREX oProg2 VAR I OF oDlg SIZE 50, 50 PIXEL TOTAL 100 ROUND ROUNDSIZE 6  ;
      GRADIENT CHUNK { { 1/2, nRGB( 255, 251, 229 ), nRGB( 250, 223, 143 ) } , ;
                       { 1/2, nRGB( 244, 194,  51 ), nRGB( 252, 235,  173 ) } };
      GRADIENT TRACK { { 1/2, nRGB( 198, 203, 213 ), nRGB( 219, 224, 233 ) },  ;
                       { 1/2, nRGB( 224, 238, 237 ), nRGB( 224, 238,237 ) } }

   /*
      GRADIENT CHUNK { { 1/2, nRGB( 255, 251, 229 ), nRGB( 250, 223, 143 ) } , ;
                       { 1/2, nRGB( 244, 194,  51 ), nRGB( 252, 235,  173 ) } }
   */


   @ 75, 70 BUTTON "Ok" ACTION( oDlg:End() ) PIXEL

   oDlg:bStart = {|| Increase( oProg1, oProg2 ) }

   ACTIVATE DIALOG oDlg CENTER

RETURN NIL

FUNCTION Increase( oProg1, oProg2 )

   LOCAL n

   oProg1:Set( 0 )
   oProg2:Set( 0 )

   FOR n = 1 TO 100

      SysRefresh()

      oProg1:Set( n )
      oProg2:Set( n )

      Sleep( 20 )

   NEXT

RETURN NIL
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7789
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Progress with error

Postby Silvio.Falconi » Fri Jun 10, 2022 7:52 am

Here not run ok ( windows 10 ) see the video


I tried
Code: Select all  Expand view
@05, 10 METEREX oProg1 VAR I OF oDlg SIZE 90, 12 PIXEL TOTAL 100 ROUND ROUNDSIZE 6  ;
      GRADIENT CHUNK { { 1/2, nRGB( 255, 251, 229 ), nRGB( 250, 223, 143 ) } , ;
                       { 1/2, nRGB( 244, 194,  51 ), nRGB( 252, 235,  173 ) } };
      GRADIENT TRACK { { 1/2, nRGB( 198, 203, 213 ), nRGB( 219, 224, 233 ) },  ;
                       { 1/2, nRGB( 224, 238, 237 ), nRGB( 224, 238,237 ) } }




Image


Make the same also the circular
Code: Select all  Expand view
@ 20,50 METER oProg2 VAR i TOTAL 168 OF oDlg SIZE 50,50 CIRCULAR NOPERCENTAGE;
      BARCOLOR nRGB(155,20,255),nRGB(0,0,0)  PIXEL
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Progress with error

Postby karinha » Fri Jun 10, 2022 1:58 pm

Silvio, change:

// Sleep( 20 )

for

SysWait( 01 )

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7789
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Progress with error

Postby Silvio.Falconi » Fri Jun 10, 2022 2:41 pm

karinha wrote:Silvio, change:

// Sleep( 20 )

for

SysWait( 01 )

Regards, saludos.


????????????????????????????????????????????
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: Progress with error

Postby cmsoft » Fri Jun 10, 2022 2:58 pm

Silvio, puedes mostrar tu codigo?
Code: Select all  Expand view

#include "fivewin.ch"

function Main()

local oDlg, oProg1, oProg2, i := 0

DEFINE DIALOG oDlg TITLE "Progress Bars" FROM 05,18 TO 17,62

//@ 1, 1 PROGRESS oProg1 SIZE 50, 12

@ 05,10 METER oProg1 VAR i TOTAL 168 OF oDlg SIZE 90,12 NOPERCENTAGE;
      BARCOLOR nRGB(105,98,255),nRGB(0,0,0) PIXEL

@ 20,50 METER oProg2 VAR i TOTAL 168 OF oDlg SIZE 50,50 CIRCULAR NOPERCENTAGE;
      BARCOLOR nRGB(155,20,255),nRGB(0,0,0)  PIXEL

//@ 1, 20 PROGRESS oProg2 SIZE 12, 50 VERTICAL

@ 75, 70 BUTTON "Ok" ACTION oDlg:End() PIXEL

oDlg:bStart = { || Increase( oProg1, oProg2 ) }

ACTIVATE DIALOG oDlg CENTER

return nil

function Increase( oProg1, oProg2 )

local n
oProg1:Set(0)
oProg2:Set(0)
for n = 1 to 168 // 111
// oProg1:StepIt()
// oProg2:StepIt()
oProg1:Set( n )
oProg2:Set( n )
Sleep( 20 )
SysRefresh()
next
RETURN nil

Este tampoco te funciona?
User avatar
cmsoft
 
Posts: 1285
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Progress with error

Postby Silvio.Falconi » Fri Jun 10, 2022 10:12 pm

cmsoft wrote:Silvio, puedes mostrar tu codigo?
Code: Select all  Expand view

#include "fivewin.ch"

function Main()

local oDlg, oProg1, oProg2, i := 0

DEFINE DIALOG oDlg TITLE "Progress Bars" FROM 05,18 TO 17,62

//@ 1, 1 PROGRESS oProg1 SIZE 50, 12

@ 05,10 METER oProg1 VAR i TOTAL 168 OF oDlg SIZE 90,12 NOPERCENTAGE;
      BARCOLOR nRGB(105,98,255),nRGB(0,0,0) PIXEL

@ 20,50 METER oProg2 VAR i TOTAL 168 OF oDlg SIZE 50,50 CIRCULAR NOPERCENTAGE;
      BARCOLOR nRGB(155,20,255),nRGB(0,0,0)  PIXEL

//@ 1, 20 PROGRESS oProg2 SIZE 12, 50 VERTICAL

@ 75, 70 BUTTON "Ok" ACTION oDlg:End() PIXEL

oDlg:bStart = { || Increase( oProg1, oProg2 ) }

ACTIVATE DIALOG oDlg CENTER

return nil

function Increase( oProg1, oProg2 )

local n
oProg1:Set(0)
oProg2:Set(0)
for n = 1 to 168 // 111
// oProg1:StepIt()
// oProg2:StepIt()
oProg1:Set( n )
oProg2:Set( n )
Sleep( 20 )
SysRefresh()
next
RETURN nil

Este tampoco te funciona?

I resolved with viewtopic.php?f=3&t=41886&sid=79bc9c8d1426005a6e34361081532558#p251085
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: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 63 guests