alertView [iPhone]

Discussion in 'iOS Programming' started by sujithkrishnan, Jun 24, 2008.

  1. sujithkrishnan macrumors 6502

    May 9, 2008
    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.

    // 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...
  2. tacoman667 macrumors regular

    Mar 27, 2008
    Have you tried sending an actual message to the object? For example:
    [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.

Share This Page