[demo] add TestStorage
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
-cp src
|
-cp src
|
||||||
-cp ../src/main
|
#-cp ../src/main
|
||||||
-lib yaml
|
-lib yaml
|
||||||
-lib promhx
|
-lib promhx
|
||||||
|
-lib haxework
|
||||||
--macro haxework.parser.Parser.auto()
|
--macro haxework.parser.Parser.auto()
|
||||||
-debug
|
-debug
|
||||||
-D native_trace
|
-D native_trace
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
<source path="../src/main"/>
|
<source path="../src/main"/>
|
||||||
<source path="src"/>
|
<source path="src"/>
|
||||||
<assets path="src" rename="image" include="*.png"/>
|
<assets path="src" rename="image" include="*.png"/>
|
||||||
|
|
||||||
<haxelib name="lime" version="7.3.0"/>
|
|
||||||
<haxelib name="openfl" version="8.9.0"/>
|
|
||||||
<haxelib name="hxcpp" version="4.0.8"/>
|
|
||||||
<haxelib name="promhx" version="1.1.0"/>
|
|
||||||
<haxelib name="yaml" version="1.3.0"/>
|
|
||||||
|
|
||||||
<haxeflag name="--macro" value="haxework.parser.Parser.auto()"/>
|
<haxelib name="lime" version=""/>
|
||||||
|
<haxelib name="openfl" version=""/>
|
||||||
|
<haxelib name="hxcpp" version=""/>
|
||||||
|
<!--<haxelib name="promhx" version=""/>-->
|
||||||
|
<haxelib name="haxework" version="git"/>
|
||||||
|
|
||||||
|
<!--<haxeflag name="--macro" value="haxework.parser.Parser.auto()"/>-->
|
||||||
<haxeflag name="--macro" value="CompilationOption.set('build','xxx')"/>
|
<haxeflag name="--macro" value="CompilationOption.set('build','xxx')"/>
|
||||||
|
|
||||||
<window fps="30"/>
|
<window fps="30"/>
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
SDK_PATH=~/sdk
|
SDK_PATH=~/sdk
|
||||||
echo "`pwd`/target" > ~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/haxework_demo.cfg
|
echo "`pwd`/target" > ~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/haxework_demo.cfg
|
||||||
. ${SDK_PATH}/neko/2.2.0/activate
|
. ${SDK_PATH}/neko/2.2.0/activate
|
||||||
. ${SDK_PATH}/haxe/3.4.7/activate
|
. ${SDK_PATH}/haxe/4.0.5/activate
|
||||||
haxe build.hxml && ${SDK_PATH}/flashplayer/32/flashplayerdebugger target/demo.swf &
|
haxe build.hxml && ${SDK_PATH}/flashplayer/32/flashplayerdebugger target/demo.swf &
|
||||||
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt
|
tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
SDK_PATH=~/sdk
|
||||||
echo "`pwd`/target/flash/bin" > ~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/haxework_demo.cfg
|
echo "`pwd`/target/flash/bin" > ~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/haxework_demo.cfg
|
||||||
. /opt/sdk/neko/2.2.0/activate
|
. ${SDK_PATH}/neko/2.2.0/activate
|
||||||
. /opt/sdk/haxe/3.4.7/activate
|
. ${SDK_PATH}/haxe/4.0.5/activate
|
||||||
haxelib run openfl test flash
|
#haxelib run openfl test flash
|
||||||
|
haxelib run openfl test html5
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package demo;
|
package demo;
|
||||||
|
|
||||||
|
import demo.storage.TestStorage;
|
||||||
import haxework.resources.IResources;
|
import haxework.resources.IResources;
|
||||||
import haxework.provider.Provider;
|
import haxework.provider.Provider;
|
||||||
import demo.dispatch.DemoDispatcher;
|
import demo.dispatch.DemoDispatcher;
|
||||||
@@ -46,14 +47,18 @@ import haxework.view.group.VGroupView;
|
|||||||
class Demo extends App implements DemoListener {
|
class Demo extends App implements DemoListener {
|
||||||
|
|
||||||
@:provide static var resources:IResources;
|
@:provide static var resources:IResources;
|
||||||
|
@:provide static var storage:TestStorage;
|
||||||
|
|
||||||
public static function main() {
|
public static function main() {
|
||||||
L.push(new TraceLogger());
|
L.push(new TraceLogger());
|
||||||
|
|
||||||
var app = new Demo(new AppTheme());
|
|
||||||
resources.image.put("logo", HaxeLogo.resolve());
|
resources.image.put("logo", HaxeLogo.resolve());
|
||||||
|
var app = new Demo(new AppTheme(), resources.image.get("logo"));
|
||||||
app.start(new DemoView());
|
app.start(new DemoView());
|
||||||
|
|
||||||
|
trace(storage);
|
||||||
|
storage.write("test", "value");
|
||||||
|
|
||||||
var dispatcher = new DemoDispatcher();
|
var dispatcher = new DemoDispatcher();
|
||||||
dispatcher.connect(app);
|
dispatcher.connect(app);
|
||||||
dispatcher.test1Signal.emit();
|
dispatcher.test1Signal.emit();
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class FontLabelView extends LabelListItem<ThemeFont> {
|
|||||||
|
|
||||||
@:view var fonts:ListView<ThemeFont>;
|
@:view var fonts:ListView<ThemeFont>;
|
||||||
|
|
||||||
private function new():Void {
|
public function new():Void {
|
||||||
super();
|
super();
|
||||||
var values:Array<ThemeFont> = Font.enumerateFonts(true).map(function(font:Font) {
|
var values:Array<ThemeFont> = Font.enumerateFonts(true).map(function(font:Font) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
10
demo/src/demo/storage/TestStorage.hx
Normal file
10
demo/src/demo/storage/TestStorage.hx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package demo.storage;
|
||||||
|
|
||||||
|
import haxework.storage.SharedObjectStorage;
|
||||||
|
|
||||||
|
@:provide class TestStorage extends SharedObjectStorage {
|
||||||
|
|
||||||
|
public function new() {
|
||||||
|
super("test");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user