Application hangs on clicking "Choose" button in IKPictureTaker view - objective-c

I am facing a strange hang issue with IKPictureTaker and on clicking a "Choose" button. I am doing below operation using IKPictureTaker.
When a user wants to change a profile picture, upon clicking "Change Image" button, I display a IKPictureTaker view along with "Choose" button by setting IKPictureTakerAllowsFileChoosingKey to YES.
First time on clicking the "Choose" button, open panel will be displayed allowing user to select an image of his choice.
Next, on clicking the "Set" button, internally I am calling a profile picture upload function of a server in a separate thread and everything works great.
Next if the user tries to do the operation 1) and 2) again application hangs on clicking the "Choose" button.
After investigation I found that this issue is something to do with the background upload operation I am doing with the server.Because if I comment the upload part of code everything looks good.
I don't see any issues with the upload operation performed in the separate thread and it gives up it s runloop once it is done with its upload operation and all UI related operations again taken care in the main thread.
Application hangs only if I click on the "Choose" button. If I select the recent pictures or take a new photo using the camera everything works great.
Is there anyone who faced the same issue? Is it something to do with the NSOpenPanel displayed when we click on the "Choose" button?

Related

I am having trouble while clicking a "Submit An App" button on my application which is present on the Menu bar

I am using the below code for this, this is present inside a frame and this also clicks the button but after button is clicked the control is lost. The possible reason i see is the page lands on same page which extra options after the "Submit An App" button is clicked.
I am using c# to code it. The first line finds the button the second line clicks but go for a timeout. I have seen this behavior fist time not sure how to work it out.
IWebElement field = VelocityDriver.FindElement(By.Id("AppSub"));
SeleniumExtensions.ClickElementAndContinue(field);

Visual Basic: Force App to Stop

How can I simulate; app has stopped
After I click a button? I'm trying to make my program display that (exactly) after I click a button.
easy way to do this is,
let your app crash in the first place ( cause some sort of exception) take a screenshot from that exact message.
Create a new form called mCrashForm, place a picturebox with the screenshot of that message ( leave out the close Program button.
Create a button in your main Form to open the crashForm with mCrashForm.Show()
Create a Button in mCrashForm which says "Close program" which executes this code snippet when pressed mCrashForm.Close()

Slow Response After Clicking Button in VB.NET

I have created a windows form on a Windows Mobile 6.5 application. This screen has a username and password field and a login menu button. After clicking the button, it takes my click event for the login button 6 or 7 seconds to reach the first line of code (an alert). It takes that long to reach the breakpoint as well.
I've tried:
changing the menu button to a login button
using AddHandler in my formLoad event
...and have still not gotten a fast response. What else could be slowing this down?
This delay seemed to happen the first time any button was clicked on the application. The only way I could get this delay to not occur was to force a dummy button click of the login button on load of the application. The delay causes the application to load a little bit longer, but at least that delay won't occur when the user clicks the button.

Activity Indicator on "Send" button and "Save Draft" button on MFMailComposeViewController in iPad

In my iPad application, I am playing some PDF and Video files. In the application user have option to email these files to himself or a friend. Email functionality is working fine and email gets delivered too. However, when user presses send button to send the email it freezes the application for sometime, also, when user presses Save Draft button to save that email, it freezes too. I think this happens because of large size of the PDF or Video file being attached and since it takes time to attach a file. When app freezes it seems like as if the iPad has hung or the app is crashing. However, it is working fine. But it doesn't look good. That is why I need to apply an activity indicator when Send or Save Draft button is pressed. It should work till the file is attached. I would apply an activity indicator, but not sure how to apply it on Send and Save Draft buttons as they come automatically in Email modal view controller.
Thanks in advance
PC
I have also experienced the same problem. Not because of the size of an attachment. It happens arbitrarily, Here's a workaround:
Enter anything in the "To:" field and then immediately backspace over it.
The "Send" and "Cancel" buttons should start working again.
If not, Quit Mail by double tapping the "Home" key, press and hold the "Mail" icon, when a minus signal shows press it on the "Mail" icon.
Relaunch mail. Your previous work should be intact.
Hope this helps.

OOB NewForm in Dialog loses focus after a few seconds

Working in SharePoint 2010, with SharePoint Designer 2010, I have a DispForm to which I've added a DVWP that displays a filtered view of another relative list. The DVWP has a 'New' link which opens the NewForm for that list in a modal dialog, using OpenPopUpPage (http://msdn.microsoft.com/en-us/library/ff410825.aspx).
After 5 - 12 seconds, the blinking cursor disappears from the first control and the focus switches to the 'Close' button. If the user was trying to type and happens to hit the Enter key when the focus switches to the 'Close' button, the background is no longer darkened and the 'Cancel' button no longer works. The form is still displayed on the screen, and the user can 'Save' but the modal never goes away until the page is refreshed.
If the user notices that the modal has lost focus and clicked back on the form, everything works as it should and all is well.
Observations:
When the control/modal loses focus, the 'Close' button does not trigger a 'focusin' event. But, $(document.activeElement).attr("value") displayed in the console shows that it's the active element.
Questions:
Why is the modal losing focus?
Does anyone have a Javascript/jQuery workaround to capture the event and set the focus back where it was?
Alternately, what if I lock the form and wait for this focus-change to complete, then unlock it and set the focus on the first field? Ideas?
You may be having a problem if the DispForm is also a dialog and you open the modal with your script. It sounds like you are getting a "layered" effect. My guess is that the script managing the dialog is interfering with the modal. Have you tried turning off the dialiogs for the list?
Just so I get some points on this site, the affliction was the asynchronous refresh of the first modal. It was taking the focus away from the layered modal.
Thanks JB for the answer!
I figured out the problem: the DVWP was using Auto-Refresh with the Async Update. This was running every 15 secs, taking the focus away from the modal, then not returning it to the last control.
So, we turned of the auto-refresh and used the callback from the modal close to trigger a click on the manual refresh button instead.