1 Reply Latest reply on Sep 11, 2007 8:27 PM by theLoggerGuy

    set variable in a parent form

    Level 7
      HI All,
      I have a form listing all my items in a datagrid, when I click in one I open
      different form where is all my item description in detail. But to select one
      item from my data I have to setup the item ID, how can I do that. I try this
      but doesn't work.

      this.visible = false;
      this.parentApplication.itemDesc_mxml.itemNewID =
      this.parentApplication.itemDesc_mxml.visible = true;

      In my itemDesc_mxml I have this

      [Bindable]public var itemNewID:Number = 0;

      public function init():void
      if (itemNewID != 0){

      Please help


        • 1. Re: set variable in a parent form
          theLoggerGuy Level 1
          It's difficult to tell from your code, but this line seems a bit suspicuos:

          this.parentApplication.itemDesc_mxml.itemNewID = items_dg.selectedItem.itemID;

          it may be that you simply want:

          itemDesc_mxml.itemNewID = items_dg.selectedItem.itemID;

          which I assume you are calling from parent of itemDesc_mxml. Also when you make itemDesc_mxml visible you should also call itemDesc_mxml.init( );