0
votes

Hey i was searching for a solution for my problem and i nearly have it just one tiny bit...

I have a NSView subclass (AppView) and a NSObject subclass (AppController) In AppView i declare a boolean with the @property than i use @synthesize and than in AppController i want to access it: i found this:

(in the implementation)

AppView *obj;
obj.booleanDraw = YES;

but i have to set obj = something ... but i have no idea what. since i just want to change the boolean from the view on a button click and the button action is defined in the AppController thanks for any help^^

2
What do you mean by “Cross- Class Variables”? - Jonathan Sterling

2 Answers

2
votes

Typically:

AppView *obj = [[AppView alloc] init];

But, possibly not in your case - I'd probably need to see more of your implementation to really give you a correct answer.

1
votes

Mr-sk is right. But if this is the sort of problem you're having, I'd suggest checking this out: http://cocoadevcentral.com/d/learn_objectivec/. That's what got me started, and I think you'd feel really good if you read it too.