0 Replies Latest reply on Jul 13, 2011 5:51 PM by superkatakam

    manipulating object values with decorators

    superkatakam

      Hi all,

      I have this issue

       

      I am trying to alter text upon pressing the up and down key in a text input. The code is as follows

       

      PriceViewComponent.mxml

       

       

      <delegates:TextInputPipDelegate textField="{fullPrice}"

                priceModel= {priceModel} />

       

      <s:TextInput id="fullPrice"

      text= {priceModel.priceText}/>

       

       

      Price.as

       

      public var textField : TextInput;

       

       

      public function pipUp() : Boolean {

      ...

      ...

      }

       

      public function pipDown(): Boolean {

      ...

      ...

      }

       

      Now the only way to insert the amount into Price.as is by creating an object of Price in TextInputPipDelegate

       

       

      TextInputPipDelegate.as

       

      public function increment (event : KeyboardEvent) : void {

       

       

       

      }

       

       

      The problem here is, I need to update the value of priceModel.fullPriceText in PriceViewComponent.mxml

      How do I do that?

      Please advice. Its an emergency.

       

      Thank you

      Nikhil