XCode Cocoa: KeyedArchiving Problem

Discussion in 'Mac Programming' started by GigaRoc, Jun 11, 2008.

  1. GigaRoc macrumors newbie

    Jun 5, 2008
    ok i have a class, has 11 variables
    5 ints
    6 floats
    in my MyDocuments.M file i declare a a instance of that class myCoinJar.
    in interface builder i add a MyDocuments Object helper. and link the buttons to methods in MyDocuments.m. i also bind NSTextFields to each Variable using bind MyDocuments.myCoinJar.(variable) . I thought everything worked fine, until i tried to implement Coding and Archiving. What i realized after working on the problem for a while was: my program was creating two instances of MyDocuments, with two instances of myCoinJar. The NSTextFields and buttons where linked to the second instance, but save was trying to save the first instance, which was just initialized, nothing else. Does anyone know what could cause this? Or how to Fix it?
  2. GigaRoc thread starter macrumors newbie

    Jun 5, 2008
    Changed the post completely, because i now know what the problem is, so I'm bumping it

Share This Page