home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / com / althea / client / shufflr / controller / DeleteCommand.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  1.1 KB  |  37 lines

  1. package com.althea.client.shufflr.controller
  2. {
  3.    import com.althea.client.shufflr.ApplicationFacade;
  4.    import com.althea.client.shufflr.model.DeleteCommandProxy;
  5.    import org.puremvc.as3.multicore.interfaces.ICommand;
  6.    import org.puremvc.as3.multicore.interfaces.INotification;
  7.    import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
  8.    
  9.    public class DeleteCommand extends SimpleCommand implements ICommand
  10.    {
  11.       public function DeleteCommand()
  12.       {
  13.          super();
  14.       }
  15.       
  16.       override public function execute(param1:INotification) : void
  17.       {
  18.          var _loc2_:String = param1.getName();
  19.          var _loc3_:Object = param1.getBody();
  20.          switch(_loc2_)
  21.          {
  22.             case ApplicationFacade.DEL_FOLLOW:
  23.                this.proxy.deleteFriend(_loc3_.userId);
  24.                break;
  25.             case ApplicationFacade.DEL_SHORTCUT:
  26.                this.proxy.delShortcut(_loc3_.shortcut);
  27.          }
  28.       }
  29.       
  30.       private function get proxy() : DeleteCommandProxy
  31.       {
  32.          return this.facade.retrieveProxy(DeleteCommandProxy.NAME) as DeleteCommandProxy;
  33.       }
  34.    }
  35. }
  36.  
  37.