• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Tim Lucas <email@hidden>
  • Date: Thu, 13 Jan 2005 16:36:27 +1100

On 13/01/2005, at 3:55 PM, E. Wing wrote:
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 think you mean a subclass of NSArrayController.

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).

Have you looked at the bMoviePalette example in /Developer/Examples/bMoviePalette ? It doesn't use bindings but its a good start.


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.

It's possible, but it's not nice. Check out: http://www.zathras.de/angelweb/x2004-12-03.htm and http://www.indyjt.com/wiki/pmwiki.php/Tutorials/IBPalettesForWindow

- tim lucas

http://www.toolmantim.com

_______________________________________________
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


  • Follow-Ups:
    • Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
      • From: "E. Wing" <email@hidden>
References: 
 >Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings (From: "E. Wing" <email@hidden>)
 >Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings (From: Tim Lucas <email@hidden>)
 >Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings (From: "E. Wing" <email@hidden>)

  • Prev by Date: Detect Safari Version
  • Next by Date: Controlling the horizontal position of the menu associated with an NSPopupButton
  • Previous by thread: Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
  • Next by thread: Re: Defining Accessors in a Custom Palette for a NSArray for Cocoa Bindings
  • Index(es):
    • Date
    • Thread