1 Reply Latest reply on Nov 5, 2006 3:44 PM by BTruchan

    Setting a value in a Model w/o using bindings?

    BTruchan
      Hello!

      I have a model that's defined like so:

      <mx:Model id="personModel">
      <person>
      <name></name>
      <age></age>
      </person>
      </mx:Model>

      In some actionscript, I've tried to do something similar to this:

      personModel.person.name = "bob";

      This doesn't work. I get an error eluding to the fact that I'm accidentally using a null value. I don't want to bind variables into this model. At first I was binding the results of an HTTPService call into this model, but later on I wanted to be able to update the model based on something non-related to the HTTPService call (such as form input).

      Thanks for your help!
      - Bret