0

In my .h:

@class PanelController;

@interface PanelController : NSWindowController <NSWindowDelegate>
{
    NSURL *zURL;
}

@property (nonatomic, assign) NSURL *zURL;

@end

In my .m:

@synthesize zURL;

...

- (IBAction)openBrowser:(id)sender {
    self.zUrl = [zOpenPanel URL];
}

Error:

zURL not found on object PanelController 
1
  • 2
    Is there a typo in the code block? You wrote "self.zUrl" which is != "self.zURL" if that's what you meant. The error string has zURL which implies something's wrong. Commented Aug 31, 2011 at 22:14

1 Answer 1

10

Because Objective-C is case sensitive.

You use self.zUrl but it should be self.zURL.

(Also, the instance variable declaration might be unnecessary if you declare a property.)

Sign up to request clarification or add additional context in comments.

2 Comments

It's still necessary under 32-bit OS X, IIRC.
(Addendum: it's necessary under the old runtime (32-bit OS X) if you're not implementing the property method(s) yourself, as it doesn't support synthesized ivars.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.