title: How can I execute code from another methods property
body: <p>Sorry if the question is not to clear, this is what im trying to do. I have an object, a delegate and a view controller.</p>
  
  <p>Object pseudo-code</p>
  
  <pre><code>@interface Car: NSObject {
      UIColor *color;
  }
  @property (assign)UIColor *color;
  - (void) setColor(UIColor col);
  @end
  
  @implementation Car
  @synthetize color;
  // i know that synthesize makes this function redundant. 
  // I just used it to demonstrate
  // the need to access an instance method.
  - (void) setColor(UIColor col)
  {
      color = col;
  }
  @end
  </code></pre>
  
  <p>delegate code</p>
  
  <pre><code>@interface myDelegate: UIApplicationDelegate {
      Car *car;
      UIViewController *theView;
  }
  @property (assign)Car *car;
  @end
  
  @implementation myDelegate
  @synthesize car;
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
  {    
      theView = [[MyViewController alloc]init];   
  
      return YES;
  }
  
  @end
  </code></pre>
  
  <p>View pseudo Code</p>
  
  <pre><code>@interface MyViewController: UIViewController {
  
      MyDelegate *appDelegate;
  }
  @property (retain) MyDelegate *appDelegate;
  @end
  
  @implementation MyViewController
  @synthesize appDelegate;
  
  - (void)viewDidLoad {
      self.appDelegate = (MyDelegate*)[[UIApplication sharedApplication] delegate];
      /// THIS IS MY ISSUSE!
      [self.appDelegate.car setColor(UIColor);
  }
  @end
  </code></pre>
  
  <p>Can anyone explain or point me to where i can understand why [self.appDelegate.car setColor()] gives me a compile error that reads "Unknown component setColor of a property".</p>
  
  <p>Im sure there is a way to do this in objective C as i would do it in python, java or other OO language.</p>
  
  <p>Any help would be greatly appreciated</p>
  
  <p>Cheers
  Rudy</p>