> An NSMapTable can be configured to give either reasonable behavior
> (strong or zeroing weak reference) so use that instead.

Or, in this special case, simply make sure that the dictionary is only used
while the controller is live--especially easy if the dictionary is a private
field of the controller...

I forget the details of the original message, and whether the code has to
dynamically adapt to different sets of outlets. If not, then consider:

enum { kButton1 = 0, kButton2, kText1, ..., kNumOfControls};

id controls[kNumOfControls];

controls[kButton1] = button1;
...

For (int i = 0; i < kNumOfControls; ++i)
  [controls[i] doSomething: ...];


-- 
Scott Ribe
[email protected]
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to