views:

79

answers:

1

Hi guys,

I am working on an iphone application. Application uses .net web service to perform an operation and return the status either "Success" or "Failure".

I am getting this status in xml parser didEndElement like

if( [elementName isEqualToString:@"OperationStatusResult"])
{

}

I am trying to show an UIAlert view if status is failure within didEndElement but it does not show. Is there anything I am missing here.

Any help would be greatly appreciated.

Thanks

A: 

I am trying to show an UIAlert view if status is failure within didEndElement but it does not show. Is there anything I am missing here.

If you are running the XML parsing in a background thread, make sure you perform the UI update on the main thread.

Put your UIAlertView code into a selector in your view controller and use the -performSelectorOnMainThread... method to fire off the alert view, if the status fails.

Alex Reynolds
My application is not multi-threadred. I am running this on the main thread.
Leo
Perhaps you might add the code showing how you are instantiating the alert view.
Alex Reynolds