Is there a way to resume a cancelled IProgressDialog - windows

In some cases, if the user clicks on the Cancel button of an IProgressDialog, I would like to ask for confirmation and resume if the user changed their mind. Is that possible? I've tried resuming the Timer and also resetting the Progress but the dialog wouldn't resume.

Related

How to check if you clicked the close button on the window? (Ruby)

I just want to ask what command in Ruby allows you to check if an application made in Ruby or running application is about to be closed? For example, I have an executable file that i ran and I clicked the close button on the window. I want to make a pop up of a dialog that says "you are about to close". Once you pressed the OK button, the window finally closes.
How can you do this in Ruby?
I don't know how things work in Ruby, but in general, on Windows, when a window receives a request to close, its window procedure receives a WM_CLOSE message. This is the place to display prompts to the user. If the app then wants to block the window from closing (because the user wants to reject it, etc), the app can simply skip destroying the window, and not pass the message on to the default message handler (DefWindowProc()).
In the case where the user clicks on the window's close button, or chooses the "Close" option from the window's pop-up system menu, or presses ALT-F4 while the window is in focus, the window receives a WM_SYSCOMMAND(SC_CLOSE) message, and if the message is passed on to the default message handler, the window then receives the WM_CLOSE message.
Take that information and translate it to Ruby as needed.

Window.alert() event in gwt

I have one doubt, What happening if we press OK button in Window.alert in gwt? Is there any event happening backside if we pressed OK button?
Window.alert() is a blocking call, so upon clicking OK the code resumes running.
Window.alert("OK?");
GWT.log("That line won't run until after you dismiss the alert box, "
+ "THAT's the \"event\"!");

Browser IE :clicking on alert ok causes the dijit dialog in background to hide away visually

I have a dijit dialog that pops up on clicking of a button. This dialog has a button which stands for submitting and one to hide the dialog On click of ok it sends a REST call and gets a response.
On error, an alert box is generated.
But what is happening here in IE 8 is that I need to explicitly again call a showdialog method to retain the dialog on screen.
What is expected behaviour is: when error occurs an alert box pops up and on click of ok the dialog in background retains. But this is not occuring normally. So I need to everytime check response and make an explicit call to show that dialog. If I do not call an explicit showdialog, the dialog simply visually seems nowhere(Gone!).
This is not a requirement if I use other browsers like chrome and FF which retain the dialog unless user himself cancels and hides them.
This explicit calling may not have been a problem unless it caused the blink effect. That is it has some delay and then shows( a sec or two after ok click on alert).
Further adding to the woe is that when this error scenario occurs and if user after clicking ok and then getting the dialog again after a blink follows and clicks cancel on dialog....poof! the behind screen that originally triggered that dialog still remains blurred! Hanging the browser!
Thanks & yes need a help, stuck on this!

Windows phone Mango - Navigation in progress

One of the pages my in application lets a user take a picture and in the meanwhile, if image is being processed, later a NavigationService GoBack is called. Now, if user clicks power button on the phone, the phone goes to sleep, and then immediately clicks power again and navigate to app, it calls Navigation GoBack.
Sometimes it will throw an error saying "Navigation is in progress", because the first user interface thread is still finishing navigation.
I have overloaded NavigateTo and NavigateFrom method. In NavigationTO I check if NavigationMode.Back I will execute GoBack.
If user clicks sleep and waits for a second or two and click on sleep again, it won't cause any issue since first user interface thread has finished executing Go Back.
Try :
if(NavigationServive.CanGoBack)
NavigationService.GoBack()

Titanium "resume" event not fired on unlock (iphone)

I am currently working on an app that check for GPS data every X mins/seconds. I use the "pause" event to stop it while the app is in background and resume it with "resume" event. No problem there.
The problem is when you lock the device: it fires the pause event but won't resume on unlock. Is it a known bug? Is there another event I should know of?
Thanks!
Listen for the "resumed" (with a D at the end) event instead of "resume".
You will get "resumed" for app relaunch (along with the "resume" event), but also for unlock, dismiss of a notification, dismiss the multitasking bar, etc.

Resources