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
1 parent
d4d2785
commit 2d3b7a2
Showing
13 changed files
with
177 additions
and
18 deletions.
There are no files selected for viewing
Binary file not shown.
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
34 changes: 34 additions & 0 deletions
34
src/com/structurecreator/controller/ProfileChangeCommand.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
package com.structurecreator.controller | |||
{ | |||
import com.structurecreator.events.ProfileChangeEvent; | |||
import com.structurecreator.events.ProfileEvent; | |||
import com.structurecreator.services.DatabaseService; | |||
|
|||
import org.robotlegs.mvcs.Command; | |||
|
|||
public class ProfileChangeCommand extends Command | |||
{ | |||
[Inject] | |||
public var event:ProfileEvent; | |||
|
|||
[Inject] | |||
public var service:DatabaseService; | |||
|
|||
public function ProfileChangeCommand() | |||
{ | |||
//super(); | |||
} | |||
|
|||
/** | |||
* Initialises the creation of a new file | |||
*/ | |||
override public function execute():void | |||
{ | |||
//trace("Add the profile"); | |||
//service.addProfile(event.name, event.schema_url); | |||
trace(int(event.name)); | |||
var profile:Array = service.selectProfile(int(event.name)); | |||
eventDispatcher.dispatchEvent(new ProfileChangeEvent(ProfileChangeEvent.PROFILE_CHANGED, profile)); | |||
} | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,29 @@ | |||
package com.structurecreator.events | |||
{ | |||
import flash.events.Event; | |||
|
|||
public class ProfileChangeEvent extends Event | |||
{ | |||
public static const PROFILE_CHANGED:String = 'profileChanged'; | |||
|
|||
private var _profile:Array; | |||
|
|||
public function ProfileChangeEvent(type:String, profile:Array) | |||
{ | |||
super(type); | |||
_profile = profile; | |||
} | |||
|
|||
override public function clone():Event | |||
{ | |||
return new ProfileChangeEvent(type, _profile); | |||
} | |||
|
|||
|
|||
public function get profile():Array | |||
{ | |||
return _profile; | |||
} | |||
|
|||
} | |||
} |
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
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
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
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