title: Accessing object of other class in objective c?
body: <p>I am trying to set <code>NSString</code>  to <code>NSTextField</code> of ClassB where the method is called in ClassA. But the <code>NSTextField</code> is not initializing the value of <code>NSString</code>.</p>
  
  <p><strong>classB.h</strong>   </p>
  
  <pre><code>   NSString *folderPath;
  </code></pre>
  
  <p><strong>ClassB.m</strong></p>
  
  <pre><code>  - (id)initWithWindow:(NSWindow *)window
      {
         self = [super initWithWindow:window];
         if (self) {
  
         [alertWindow setIsVisible:NO];
  
         [pdfStatusText setStringValue:@"Null"];
         }
  
        return self;
      }
  
      -(id)initWithAlertWindowControllers:(NSString*)fileName andTitle:(NSString *)title
      {
         //some part of code here
         //i am trying to set String value to the NSTextField pdfStatusText
         folderPath=fileName; 
         [pdfStatusText setStringValue:folderPath];     
      }  
  
  
      - (void)windowDidLoad
      {
         [super windowDidLoad];
         [self.window makeKeyAndOrderFront:self];
  
      }
  </code></pre>
  
  <p><strong>classA.m</strong></p>
  
  <pre><code>     _alertWindow = [[AlertWindowController alloc] initWithAlertWindowControllers:Path andTitle:@"Project"];
  </code></pre>
  
  <p>Thank you..</p>