title: setting NSString
body: <p>I set a NSString variable in a method, but when I go to retrieve that variable it is null??</p>
  
  <pre><code>#import "FourthViewController.h"
  
  @implementation FourthViewController
  
  @synthesize Username,Password,test;
  
  NSString *usName;
  NSString *pWord;
  
  - (void)dealloc
  {
      [super dealloc];
  }
  
  - (void)didReceiveMemoryWarning
  {
      // Releases the view if it doesn't have a superview.
      [super didReceiveMemoryWarning];
  
      // Release any cached data, images, etc that aren't in use.
  }
  
  #pragma mark - View lifecycle
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      gmail.delegate=self;
      NSString *url= [NSURL URLWithString:@"http://"];
      NSURLRequest *requestObj= [NSURLRequest requestWithURL:url];
      [gmail loadRequest:requestObj];
      [super viewDidLoad];
  }
  
  -(void)webViewDidFinishLoad:(UIWebView *) webView {
      usName = [NSString stringWithFormat:@"document.getElementById('Email').value='%@'",Username];
      [gmail stringByEvaluatingJavaScriptFromString:usName];
       pWord = [NSString stringWithFormat:@"document.getElementById('Passwd').value='%@'",Password];
      [gmail stringByEvaluatingJavaScriptFromString:pWord];
      [gmail stringByEvaluatingJavaScriptFromString:@"clicked();"]; 
  }
  
  -(void)getUserName:(NSString *)uName
  {
      [[Username alloc] init];
      Username = uName;
      NSLog(@"USERNAME: %@",Username);
  }
  
  -(void)getPassword:(NSString *)pWord
  {
      self.Password = pWord;
  }
  
  - (void)viewDidUnload
  {
      [super viewDidUnload];
      // Release any retained subviews of the main view.
      // e.g. self.myOutlet = nil;
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
      // Return YES for supported orientations
      return YES;
  }
  
  @end
  </code></pre>