I am trying to initialize a NSstring,NSUrl but it is not accepting value with in a touchup event if variables are declared locally but if i declare NSstring globally it accepts value
Pls ny one can explain
Code:
-(IBAction)btnLoginGoClicked:(id)sender
{
NSString *userid,*pass;
userid=txtUserId.text;
pass= txtPassword.text;
NSString *loginurl= [[NSString alloc] initWithFormat:@"http://abc.com/email=%@&password=%@&chk=&requestFlag=appRequest",userid,pass];
NSUrl *url = [NSURL URLWithString:loginurl];
===>shows NSString * loginurl <variable nil ===>on breakpoint
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[loginurl release];
[request setDelegate:self];
[request startAsynchronous];