1 Reply Latest reply on Nov 23, 2007 2:15 AM by N00bie_XL

    Private / Public mistake?

    N00bie_XL
      I'm using the following code:

      [Bindable]
      private var mails:*;

      public function onJSONLoad(event:ResultEvent):void {
      var mails:* = JSON.decode(String(event.result));
      spamGrid.dataProvider = mails;
      mx.controls.Alert.show(mails[0].signature,"Signature");
      }

      public function myKeyUpHandler(event:KeyboardEvent):void {
      var KEY_DELETE:uint = 46;
      if ((event.keyCode == Keyboard.DELETE) && (spamGrid.selectedIndex > -1)) {
      mx.controls.Alert.show(mails[0].signature,"Signature");
      }
      }

      The first Alert works but the second gives this error:

      TypeError: Error #1010: A term is undefined and has no properties.

      Any suggestions?

      Thx ! :)