Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
- Subject: Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
- From: "E. Wing" <email@hidden>
- Date: Wed, 12 Jan 2005 20:55:37 -0800
Thanks for responding. I think I'm starting to understand this better,
but I have a few more followup questions...
> I'd imagine you'd have a graph view (NSView subclass -- view) and a
> graph controller (NSArrayController -- nonview) in your palette.
>
> The view would be bound to the controller, the controller would be
> bound to the tableview.
So in my custom palette, how would I actually accomplish setting up
these bindings between my graph view and my graph controller. I'm used
to having a nib file and dragging an NSArrayController palette object
into my Nib and setting things up using the inspector. For a custom
palette, its not obvious to me that I can do this. Will I have to
setup my bindings programatically (as demonstrated with Malcolm
Crawford's Manual Bindings and Graphics Bindings examples)? Or is it
simpler than this. Do you think you could give me an example of what
the classes might look like, the methods they need, and how I connect
them?
For example, I think I need a GraphView class which is a subclass of
NSView. It looks like I will also need a GraphController class which
is probably a subclass of NSObject. I'm not exactly sure how to say in
a palette that this is a controller that every must bind to.
Perhaps pointing me to some code snippits might make this clearer for
me (like if there was something specific in one of Malcolm's bindings
examples).
> It would be great if you could combine the view and controller creation
> step into one, so when the user drags out the graph view it
> instantiates a correspdoning graph controller and sets the outlets
> correctly. Then the user just has to bind the controller with the
> tableview. I'm not 100% sure you can do this. Specifically, i'm not
> sure if you can add an object instance to the 'instances' palette...
> but they say anything's possible with IB ;)
Yes, this is exacly what I would like to do. I would just like the
user drag out my graph view. And then the user can drag out a regular
tableview and merely setup the bindings.
Thanks,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden