Re: Basic concepts help. making IB connection to a specific instance
Re: Basic concepts help. making IB connection to a specific instance
- Subject: Re: Basic concepts help. making IB connection to a specific instance
- From: Chris Hanson <email@hidden>
- Date: Tue, 15 Apr 2003 23:23:53 -0500
At 2:05 PM +1200 4/16/03, Denis Stanton wrote:
In my case there are actions within class B that can change the list
of menu items displayed in a submenu. I tried to move this code
into class B but I couldn't figure out how class B was going to get
at the menu to update it. I now understand that class A has to
detect the change in class B, either through a return value or by
examining B's instance variables after sending it a message, and
then update the interface accordingly.
The instance of ClassB in which the change occurs can also post a
notification, which the instance of ClassA managing a particular
report can observe and use to update the interface.
In your example, ClassB is a model object while ClassA is a
controller object. In your application, ClassB would probably be
Report and ClassA would be ReportController or something like that.
If you'd like to move away from hard-coding your business logic, take
a look at my BDRuleEngine framework
<
http://bdistributed.com/Projects/BDRuleEngine/>.
Also, for doing unit testing and test-first development of your
application (which this type of application can be very amenable to)
check out Sen:te's OCUnit unit testing framework
<
http://www.sente.ch/software/ocunit/>.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.