0 Replies Latest reply on Mar 30, 2009 12:21 AM by Cognizant_Developer

    problem with focus

    Cognizant_Developer
      private function init():void
      { this.setFocus();
      this.addEventListener(KeyboardEvent.KEY_DOWN,keySupport);
      }

      public function keySupport(event:KeyboardEvent):void
      {
      var char:String = String.fromCharCode(event.charCode).toUpperCase();

      if (event.keyCode == Keyboard.ENTER) {
      var name : String="";

      if(focusManager==null || Object(focusManager.getFocus())== null || Object(focusManager.getFocus()).name == null){
      name="MNU_00085_BE_SelectBatch_ctrl";
      }else{
      name= Object(focusManager.getFocus()).name;
      }
      click_ENTER(name, event);

      }else if(event.shiftKey && char=="R"){
      resetBatch();
      }else if(event.shiftKey && char=="F"){
      refresh();
      }else if(event.shiftKey && char=="V"){
      if(_batchEntryModel.resBatchItem.ibatchStatusId != CashCommonConstants.VOID &&
      _batchEntryModel._blnBtchMainVoidButton==true){
      voidBatchPopup();
      }
      }else if(event.shiftKey && char=="S"){
      changeToTransactionEntrySecondScreenState(event);
      }else if(event.shiftKey && char=="A"){
      addBatchPopup();
      }else if(event.shiftKey && char=="B"){
      batchDetailsPopup();
      }else if(event.shiftKey && char=="P"){
      print();
      }else if(event.shiftKey && char=="H"){
      help(event);
      }
      }