Re: Objective-C++, class scope constants, name conflicts
Re: Objective-C++, class scope constants, name conflicts
- Subject: Re: Objective-C++, class scope constants, name conflicts
- From: Erik Buck <email@hidden>
- Date: Fri, 10 Feb 2006 21:16:51 -0500
On Feb 10, 2006, at 8:34 PM, Scott Ribe wrote:
Of course the coupling is undesirable, but as far as I know, Cocoa
offers me
NO WAY to change that number of controls in a nib without changing
code in
my controller. (And it certainly doesn't offer me a path to add
controls
without remembering to connect them all properly.) If I am wrong,
please
enlighten me. If not, then realize that I am merely trying to
reduce the
code that must be changed to a minimum: changing the value of one
constant,
adding or subtracting IBOutlet ivar declarations, and adding or
subtracting
single-line initializations of the form controllerArray[7] =
controllerGroup7.
Are you aware of NSMatrix, NSTableView, NSArrayController, and
NSTabView. All of these (and some other options too) can be used in
different circumstances to let you use zero or one IBOutlet to access
any number of controls difiend in IB. This way, the number of
controls can be set in IB and only in IB.
There is also "Foundation Collections Palette" that allows you to put
the array in your IB NIB file so that your class only needs an
IBOutlet to the array of controls. You can populate the array
entirely within IB. Make any target/action connections in IB.
http://www.geocities.com/kritter_cocoadev/
There is also "Subviews in TableView Rows" http://www.stepwise.com/
Articles/Technical/2003-12-20.01.html
_______________________________________________
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