views:

42

answers:

2

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  A: 

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.

Mr-sk
thank you!! i had become quite desparate xD
Samuel
heh, no problem.
Mr-sk
+1  A: 

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.

Jonathan Sterling
Good call - Yeah Samuel you might want to dig into some basics so your able to really grasp the concepts before you move to more difficult programming - none the less, good luck going forward. That's a good link, I've gone through it was well in the past.
Mr-sk
Okay thank you, well coming from the pretty straightforward PHP i have my difficulties with objective c.
Samuel