UIAlertView brings up completely unexpected function
<pre><code>    -(void) buttonClick:(id) sender
{

    action=[[UIAlertView alloc] initWithTitle:nil message:@"Confirm for action" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil];

    [action addButtonWithTitle:@"Yes"];


    [action show];
    [action release];



}

    - (void)alertView:(UIAlertView *)action didDismissWithButtonIndex:(NSInteger)buttonIndex {
    if (buttonIndex == 1) {
        [self func1];
    }
    else if (buttonIndex ==0)  //cancel
    {

    }
}
</code></pre>

<p>instead of executing func1 when clicked Yes on alertview, the app pop up a registration form from my registration page in the app.</p>
