| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi everybody,
Do you remember I was toying around the NSBezierPath class ? Well, I've
decided to go a little step further and I'm now trying to implement a
little GUI. The main goal is : "I press a button and then a random curve
is generated".
Here are the step I've done so far:
1) I've created 2 interfaces: a NSView subclass and another "controller"
istantiated class for the gui...
2) ... I've #imported the NSView class inside the other...
3) ... I've made my NSPoints in the NSView class as @public ...
4) I try to access the points from the main class but it tells me it's
"undeclared" ?!?
How can it be possible ? How can I make a class gain variables and values
from a "brother" one ?!?
Better design would require that you define the variables as @private and then create accessor methods to access them/change them. That way you can use the standard [object_name method_name] syntax to access them.
If you want to learn more about accessor methods you may want to take a look at Recipe 1 of "Vermont Recipes" which is located at http://www.stepwise.com/Articles/VermontRecipes/
| References: | |
| >Re: Bezier folies (From: email@hidden) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.