KVO and / vs. Controllers?

Discussion in 'Programmer Misc' started by slashlos, May 29, 2008.

  1. slashlos

    slashlos Guest

    I had embarked on migrating to key value observing to reduce code and
    has gone well but I'm thinking I missed something.

    I had coded a sample class, its KVC methods, and created a model for it
    in IB. The window there has a controller in which I made the window its
    delegate so that upon close it'd write out what it had. The KVO
    observings I'd added to the controller's awakeFromNib and removed them
    at the windowShouldClose delegate. I had all working fine when it dawned
    on me I should invest instead into using an object controller.

    Rather than coding KVO observing and unobserving, could / should you
    instead use an object controller connected to the model of that object?
    The attributes do need to be added in the object controller but it would
    save a bunch of code.
    --
    /los "I was a teenage net-random."

    ____________________________________________________________________
    Carlos D. Santiago Phone: 516/447-7368
    Oracle Corporation Mobile: 516/446-9902
    ____________________________________________________________________
     
    slashlos, May 29, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.