This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private var _isGoingUp:Boolean = false; | |
| private function togglePanelPosition(e:MouseEvent):void | |
| { | |
| var yPos:Number = ON_STAGE_Y; | |
| if(_isGoingUp) | |
| { | |
| yPos = OFF_STAGE_Y; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new CombinationGameBuilder() | |
| .requireOneOf ( someItems ) | |
| .requireNoneOf ( someOtherItems ) | |
| // more rules as required | |
| .build(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.client.app.feature.restricted.model { | |
| public class AdminDataLoadingURLVarsFactorySupport extends AdminDataLoadingURLVarsFactory { | |
| public function AdminDataLoadingURLVarsFactorySupport(keyIsGood:Boolean = true) { | |
| if(keyIsGood){ | |
| fingerprintKey = new AdminKeyGoodSupport(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'find' | |
| if ARGV.length != 2 | |
| raise ArgumentError.new('Two arguments are required: path, extension') | |
| end | |
| path = ARGV[0] | |
| extension = ARGV[1] | |
| numFiles = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package strategy.xendtoendtests { | |
| // imports removed for brevity | |
| public class PyramidGameEndToEndTest extends TestCase { | |
| private var robotEyes:RobotEyes; | |
| private var config:IGameConfig; | |
| private var endToEndTests:Vector.<Class>; | |
| private var runningEndToEndTests:Boolean; | |
| private var dummyDispatcher:EventDispatcher = new EventDispatcher(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // code required in your context startup - this uses Config::Variables to set the logger at compile time, | |
| // but you could just swap it in/out as required and do away with the if/else etc | |
| commandMap.mapEvent(LoggingEvent.LOG_EVENT, UpdateLogCommand, LoggingEvent); | |
| if(CONFIG::HiddenLogging) | |
| { | |
| injector.mapSingletonOf(ILoggingService, TraceLoggingService); | |
| } | |
| else if(CONFIG::EmailLogging) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ////////// code in a robotlegs mediator | |
| private function someHandler(e:Event):void | |
| { | |
| // whatever | |
| } | |
| // this mediator adds the handler to the relaxedEventMap | |
| override public function onRegister():void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Good mediator behaviour: | |
| function handleDataEvent(e:DataEvent):void | |
| { | |
| var userVO:UserVO = e.userVO; | |
| view.showUsername(userVO.firstname, userVO.surname); | |
| view.showAge(userVO.age); | |
| view.setStatus(userVO.isSaved); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.client.project.xendtoendtests { | |
| import asunit.framework.TestCase; | |
| import AcademyShell; | |
| import shell.AcademyShellSkin; | |
| import com.newloop.roboteyes.inViewOf; | |
| import com.newloop.roboteyes.core.RobotEyes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // params: command, isOneShot, requireInOrder | |
| compoundCommandMap.mapToEvents(SomeAwesomeCommand, true, true) | |
| .addRequiredEvent(SomeEvent.SOMETHING_HAPPENED, SomeEvent); | |
| .addRequiredEvent(SomeOtherEvent.SOMETHING_ELSE_HAPPENED, SomeOtherEvent, 'somethingElseHappened'); | |
| .addRequiredEvent(SomeOtherEvent.STUFF_HAPPENED, SomeOtherEvent, 'stuffHappened'); | |
| // in the command itself | |
| [Inject] | |
| public var someEvent:SomeEvent; |