[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSController design
From: |
address@hidden |
Subject: |
Re: NSController design |
Date: |
18 Sep 2006 02:45:53 -0700 |
User-agent: |
G2/1.0 |
Markus Hitter schrieb:
> Am 17.09.2006 um 21:45 schrieb Fred Kiefer:
>
> > We first need to decide if it is ok to add these classes to GNUstep
> > gui.
> > Then somebody with understanding of key value binding needs to add the
> > actual code.
>
> Having done a few small apps using Bindings, I'm not sure why Apple
> made a distinction between Bindings and traditional NIB connections.
>
> Even if traditional connections are used one-way usually, the design
> would allow to use them two-way.
>
> Both, Bindings and traditional connections, allow/use key-value-coding.
>
> As far as I can see, NSController and buddies are a great thing, but
> could be done with connections as well. This would trim one
> technology a newbie has to learn, an oldbie has to remember and would
> reduce the clutter in the NIB/GUI builder.
>
> Am I missing a point here?
Bindings are more tight and attributed connections than the others.
NSNibOutletConnectors are connected by storing just a pointer to the
referred object in an instance variable.
NSNibControlConnectors connections do a setTarget: and setAction:
NSNibBindingConnectors call bind:toObject:withKeyPath:options: - which
provides more information that the other two (i.e. a keyPath and
options).
Please look at
http://www.quantum-step.com/download/sources/mySTEP/AppKit/Sources/NSNibConnectors.m
for an incomplete implementation of NSNibBindingConnectors.
BTW, NIBs can also encode NSIBHelpConnectors for tooltips.
-- hns