Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kristofer Joseph
committed
Mar 10, 2011
1 parent
5eeaa11
commit 1b6c07d
Showing
6 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'rubygems' | ||
require 'robotlegs' | ||
require 'bundler' | ||
Bundler.require | ||
|
||
generator = Robotlegs::SignalContextGenerator.new | ||
generator.parse! ARGV | ||
generator.execute |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Robotlegs | ||
class SignalContextGenerator < FlashSDK::ClassGenerator | ||
include RobotlegsHelper | ||
|
||
def manifest | ||
if(!input.match(/Test$/)) | ||
directory context_directory do | ||
template "#{class_name}.as", 'RobotlegsSignalContext.as' | ||
end | ||
end | ||
|
||
if test_class | ||
generator :test_class, :input => "#{fully_qualified_class_name}Test", :force => true | ||
end | ||
end | ||
|
||
def context_directory | ||
src_array = [] << src | ||
src_array += package_directory | ||
end | ||
|
||
def package_name | ||
default_package_name.dup | ||
end | ||
|
||
end | ||
end |
41 changes: 41 additions & 0 deletions
41
lib/robotlegs/generators/templates/RobotlegsSignalContext.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package <%= package %> | ||
{ | ||
import flash.display.DisplayObjectContainer; | ||
|
||
import org.robotlegs.mvcs.SignalContext; | ||
|
||
public class <%= class_name %>Context extends SignalContext | ||
{ | ||
//--------------------------------------- | ||
// CONSTRUCTOR | ||
//--------------------------------------- | ||
|
||
public function <%= class_name %>Context(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true) | ||
{ | ||
super(contextView,autoStartup); | ||
} | ||
|
||
//--------------------------------------- | ||
// OVERRIDEN METHODS | ||
//--------------------------------------- | ||
|
||
override public function startup():void | ||
{ | ||
//Service | ||
//injector.mapSingleton(YOUR SERVICE); | ||
|
||
//Model | ||
//injector.mapSingleton(YOUR PROXY); | ||
|
||
//Controller | ||
//signalCommandMap.mapSignal( YOUR START UP SIGNAL, YOUR START UP COMMAND ); | ||
|
||
//View | ||
//mediatorMap.mapView(YOUR VIEW, YOUR MEDIATOR); | ||
|
||
//Dispatch a start up signal | ||
|
||
super.startup(); | ||
} | ||
} | ||
} |
This file contains 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