Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all.

In my iHpone app, i am showing an alertview in a separate thread, while the main carry on with some parsing...

I call the showAlertView: method using [NSThread detach........] method..

I created the alertview as a property and i dismiss it after downlaoding completed in main Thread.

But i want to change the message of the alertview in middle of downloading to show which file i am parsing...

my code is like below.

Code:
// call showAlertView as a thread here
[B]//loop start (4 times)[/B]

//parse file number n here
    
alertview.message = [NSStirng stringWithFormat:@"Downlaoding %d th file",i];

[B]end of loop[/B]

//alertview dismissing here
//alertview release here

But the message is not changing , it remains same as what i used to initialize the alertview in thread...
 

tacoman667

macrumors regular
Mar 27, 2008
143
0
Hi all.

In my iHpone app, i am showing an alertview in a separate thread, while the main carry on with some parsing...

I call the showAlertView: method using [NSThread detach........] method..

I created the alertview as a property and i dismiss it after downlaoding completed in main Thread.

But i want to change the message of the alertview in middle of downloading to show which file i am parsing...

my code is like below.

Code:
// call showAlertView as a thread here
[B]//loop start (4 times)[/B]

//parse file number n here
    
alertview.message = [NSStirng stringWithFormat:@"Downlaoding %d th file",i];

[B]end of loop[/B]

//alertview dismissing here
//alertview release here

But the message is not changing , it remains same as what i used to initialize the alertview in thread...

Have you tried sending an actual message to the object? For example:
Code:
[alertView setText:@"File Being Parsed"];

This may be able to cross-thread talk between the 2 objects. I could be wrong though as I am from the Windows world of programming in C# and havn't multithreaded an application on Obj-C yet.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.