Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Getting started...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3777 of 3882
Post > Topic >>

Getting started with MVC

by slashlos <slashlos@[EMAIL PROTECTED] > Jun 20, 2008 at 11:51 AM

I'm trying to make the transition (from delegates and data sources) but 
have gotten stuck. I have parent object which contains several arrays.

The object in one array is has a member that is also has an array which 
I had represented as an outline. There's where I'm stuck.

The application is a scheduler with objects like this:

     site - parent object
       rooms - array of 'room' objects
       venues - array of 'schedule' objects

     schedule    - parent object of array of agenda objects

     agenda      - object contains a date and array of time objects

The agenda 'date' object is separated from the time (really a date 
object as well) so that the date can be manipulated apart from the times 
array.

So for a given site, each room can be signed out to a given venue which 
minimally contains at least 1 schedule object. Each schedule is 
minimally offered on at least 1 agenda object. The agenda object details 
information like the date for the program or event, and the times (can 
be multiple) it's offered that day.

So far I have these bindings which work;

     Rooms - NSArrayController
     BindTo: ControllerAlias
     Key:    selection
     Model:  rooms

     Venues - NSArrayController
     BindTo: ControllerAlias
     Key:    selection
     Model:  venues

But how to make the linkage for the agendas? I believe this should be a 
tree controller, since the agenda is presented as an outline:

     Agenda - NSTreeController
     BindTo:  Venues
     Key:     selection
     Model:   venue

But alas my outline is empty so I suspect I'm doing something wrong. Or 
it could be I need still more to read (NSManagedObject)?  Btw, the 
parent object site I had instantiated in IB and linked my window 
controller to it; this macho controller governs all but has become too 
big which led me to the MVC migration in the first place.

Also, how / can you intercept the 'add','remove', etc. methods? In my 
model each requires at least 1 of each element, and when adding new 
elements I may need the ability to offset some fields so that there's no 
date / time overlap for a given room or site.
-- 
/los  "I was a teenage net-random."

____________________________________________________________________
Carlos D. Santiago                              Phone: 516/447-7368
Oracle Cor****ation                             Mobile: 516/446-9902
____________________________________________________________________
 




 1 Posts in Topic:
Getting started with MVC
slashlos <slashlos@[EM  2008-06-20 11:51:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 10:57:58 CST 2008.