Jump to content

Progress indicator


Guest

Recommended Posts

Message from: "Jason Reid"

 

Hi Farshad

 

I have a little query.

 

How can I implement a progress indicator in my application?

 

I have a main form with various buttons, when you click one of the buttons

it goes off and does something which can take a few seconds.

I want to disable the main form while it is working to prevent the user from

clicking something else and (if possible) display some sort of progress

indicator.

 

I have tried to do this using a new modal form with a progress bar on it,

but I find that ,my "progress form" only shows after the operation are

finished, which doesn't help me much.

 

Thanks

 

--

Jason Reid

Systems Developer

Compucorp Ltd.

www.compucorp.co.uk

 

 

 

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

Hi,

 

Yes, that's something that I had in mind too. Ext JS works in a fully

asynchronous manner. While it is a good thing there are moments when we want

things to execute synchronously.

 

There are some options.

 

We can force all AJAX calls to execute synchronously but it is not a good

solution because many Ext JS events just work fine in an asynchronous

manner. I think it is better to let the developer decide where events should

block UI while the execution is in progress. (like your query example)

 

We can use Ext JS MessageBox for this purpose. It has a built-in progress

bar. Now, I must develop a mechanism where developer can decide how to

activate this feature when it is needed.

 

I added this to issue tracker. I will try to include this in next release.

 

Regards,

Farshad

 

"Jason Reid" wrote in message

news:cTAjH$tNLHA.7696@anaxavps227.anaxa.local...

> Hi Farshad

>

> I have a little query.

>

> How can I implement a progress indicator in my application?

>

> I have a main form with various buttons, when you click one of the buttons

> it goes off and does something which can take a few seconds.

> I want to disable the main form while it is working to prevent the user

> from clicking something else and (if possible) display some sort of

> progress indicator.

>

> I have tried to do this using a new modal form with a progress bar on it,

> but I find that ,my "progress form" only shows after the operation are

> finished, which doesn't help me much.

>

> Thanks

>

> --

> Jason Reid

> Systems Developer

> Compucorp Ltd.

> www.compucorp.co.uk

>

>

>

>

 

 

.

 

Link to comment
Share on other sites

Message from: "Jason Reid"

 

Hi Farshad

 

Thanks for this reply

 

I have come up with a little solution that works ok.

 

Basically I'm "Chaining" events together with a timer so :

 

- I call my "BusyForm" on modal mode when I want to do a lengthy process

 

- OnShow of the "BusyForm" I start a 1 second timer (gives a little delay to

actually show the form)

 

- OnTimer I set the timer to inactive and call my lengthy process

 

- After Process is done I close the "BusyForm"

 

That works fairly well.

 

I suppose another option is to run my lengthy process in a new thread ?

 

 

 

--

Jason Reid

Systems Developer

Compucorp Ltd.

www.compucorp.co.uk

 

 

 

 

"Farshad Mohajeri" wrote in message

news:QKNlWmzNLHA.1608@anaxavps227.anaxa.local...

> Hi,

>

> Yes, that's something that I had in mind too. Ext JS works in a fully

> asynchronous manner. While it is a good thing there are moments when we

> want things to execute synchronously.

>

> There are some options.

>

> We can force all AJAX calls to execute synchronously but it is not a good

> solution because many Ext JS events just work fine in an asynchronous

> manner. I think it is better to let the developer decide where events

> should block UI while the execution is in progress. (like your query

> example)

>

> We can use Ext JS MessageBox for this purpose. It has a built-in progress

> bar. Now, I must develop a mechanism where developer can decide how to

> activate this feature when it is needed.

>

> I added this to issue tracker. I will try to include this in next release.

>

> Regards,

> Farshad

>

> "Jason Reid" wrote in message

> news:cTAjH$tNLHA.7696@anaxavps227.anaxa.local...

>> Hi Farshad

>>

>> I have a little query.

>>

>> How can I implement a progress indicator in my application?

>>

>> I have a main form with various buttons, when you click one of the

>> buttons it goes off and does something which can take a few seconds.

>> I want to disable the main form while it is working to prevent the user

>> from clicking something else and (if possible) display some sort of

>> progress indicator.

>>

>> I have tried to do this using a new modal form with a progress bar on it,

>> but I find that ,my "progress form" only shows after the operation are

>> finished, which doesn't help me much.

>>

>> Thanks

>>

>> --

>> Jason Reid

>> Systems Developer

>> Compucorp Ltd.

>> www.compucorp.co.uk

>>

>>

>>

>>

>

>

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

Hi Jason,

 

Yes, your method seems to work fine. You can set the Interval to 1 ms so it

will pop up almost immediately.

 

I will investigate to add a built-in function to block UI when it is needed.

 

"Jason Reid"

> Hi Farshad

>

> Thanks for this reply

>

> I have come up with a little solution that works ok.

>

> Basically I'm "Chaining" events together with a timer so :

>

> - I call my "BusyForm" on modal mode when I want to do a lengthy process

>

> - OnShow of the "BusyForm" I start a 1 second timer (gives a little delay

> to

> actually show the form)

>

> - OnTimer I set the timer to inactive and call my lengthy process

>

> - After Process is done I close the "BusyForm"

>

> That works fairly well.

>

> I suppose another option is to run my lengthy process in a new thread ?

>

>

>

> --

> Jason Reid

> Systems Developer

> Compucorp Ltd.

> www.compucorp.co.uk

>

>

>

>

> "Farshad Mohajeri" wrote in message

> news:QKNlWmzNLHA.1608@anaxavps227.anaxa.local...

>> Hi,

>>

>> Yes, that's something that I had in mind too. Ext JS works in a fully

>> asynchronous manner. While it is a good thing there are moments when we

>> want things to execute synchronously.

>>

>> There are some options.

>>

>> We can force all AJAX calls to execute synchronously but it is not a good

>> solution because many Ext JS events just work fine in an asynchronous

>> manner. I think it is better to let the developer decide where events

>> should block UI while the execution is in progress. (like your query

>> example)

>>

>> We can use Ext JS MessageBox for this purpose. It has a built-in progress

>> bar. Now, I must develop a mechanism where developer can decide how to

>> activate this feature when it is needed.

>>

>> I added this to issue tracker. I will try to include this in next

>> release.

>>

>> Regards,

>> Farshad

>>

>> "Jason Reid" wrote in message

>> news:cTAjH$tNLHA.7696@anaxavps227.anaxa.local...

>>> Hi Farshad

>>>

>>> I have a little query.

>>>

>>> How can I implement a progress indicator in my application?

>>>

>>> I have a main form with various buttons, when you click one of the

>>> buttons it goes off and does something which can take a few seconds.

>>> I want to disable the main form while it is working to prevent the user

>>> from clicking something else and (if possible) display some sort of

>>> progress indicator.

>>>

>>> I have tried to do this using a new modal form with a progress bar on

>>> it, but I find that ,my "progress form" only shows after the operation

>>> are finished, which doesn't help me much.

>>>

>>> Thanks

>>>

>>> --

>>> Jason Reid

>>> Systems Developer

>>> Compucorp Ltd.

>>> www.compucorp.co.uk

>>>

>>>

>>>

>>>

>>

>>

 

 

.

 

Link to comment
Share on other sites

  • 11 years later...
8 minutes ago, rhazell said:

Is there now (this is a very old post) a component available, or an elegant way to display a wait message and / or lock the screen for async operations that take more than a couple seconds?

Hello,

How do you start the async operations?

Link to comment
Share on other sites

My current requirement comes when I am manipulating rows in a table. For example...

myTable.First;
while not myTable.Eof do
begin
  // do some stuff here 

myTable.Next;
end;

 

The above operation may take several seconds to complete and I need to at least inform the end user about this - better still provide a progress.

PS I am new to uniGUI and still trying to wrap my head around async operations and even refactor some code to be more suitable for the web, however, there will always be some areas where I need the user to know there's a lengthy process that ocurring.

TIA

Link to comment
Share on other sites

1 minute ago, rhazell said:
myTable.First;
while not myTable.Eof do
begin
  // do some stuff here 

myTable.Next;
end;

When do you run this code?

Many controls have the ScreenMask property.

For example the grid (UniDBGrid) has a LoadMask property.

You can use these properties.

Link to comment
Share on other sites

1 minute ago, rhazell said:

Typically (and particularity in this case)  this code runs as a result of the user pressing a uniButton... any further recommendations, for this scenerio?

I will definitely look into the LoadMask property

Use both.

UniButton1:

image.png.9bc331e7c0f86ee348e83ab1fedc9be4.png

UniDBGrid1:

image.png.60038ec99378f8b0a898d955c728f7f1.png

Link to comment
Share on other sites

  • 1 month later...

The supplied instructions work well for components that have ScreenMask property (great feature), however, how do I go about showing a "ScreenMask" for the following situations, please? 

1) user double-clicks UniDBGrid and the resulting event handler performs a potentially lengthy task - I would like to show a ScreenMask 

2) the OnCange event of a PageControl performs a potentially lengthy task - I would like to show a ScreenMask

TIA

Link to comment
Share on other sites

3 hours ago, rhazell said:

The supplied instructions work well for components that have ScreenMask property (great feature), however, how do I go about showing a "ScreenMask" for the following situations, please? 

1) user double-clicks UniDBGrid and the resulting event handler performs a potentially lengthy task - I would like to show a ScreenMask 

2) the OnCange event of a PageControl performs a potentially lengthy task - I would like to show a ScreenMask

TIA

Hello

You can call Showmask and synchronize to show screen mask.

Please check "SyncClientUpdate - 4 - ShowMask" demo

  • Thanks 1
Link to comment
Share on other sites

When a user moves to a new row in a grid (via keyboard or mouse) it correctly fires the OnAfterScroll event of the attached DataSet... 

How can I display a ScreenMask for the duration of the fired OnScroll event?

FYI: If they move to a new row using dbnavigator (with it's screenmask enabled) that's attached to the same DataSet the ScreenMask is correctly displayed for the duration of the OnScroll event.

TIA

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...