robotlegs使用例子的笔记

作者:袖梨 2022-06-28


先放上我写的demo吧,明天回老家,等下周来了继续写哈~

as文件

代码如下 复制代码
package
{
import com.pztai.example.AppConfig;

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;

import robotlegs.bender.bundles.mvcs.MVCSBundle;
import robotlegs.bender.extensions.contextView.ContextView;
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.impl.Context;
import flash.events.IEventDispatcher;

import com.pztai.example.view.events.indexViewEvent;

public class vcandroid extends Sprite
{
private var _context:IContext;

public function vcandroid()
{
super();

// 支持 autoOrient
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

_context = new Context()
.install(MVCSBundle)
.configure(AppConfig)
.configure(new ContextView(this));

}
}
}

xml文件

代码如下 复制代码



com.95195.vcandroid


vcandroid


面聊


0.0.1









[此值将由 Flash Builder 在输出 app.xml 中覆盖]


















true
false
true





































































]]>



UIDeviceFamily

1
2

]]>

high


这个demo仅仅实现了核心的交互

其中需要注意的地方

1.AppConfi.as 里面的注入要写在config()函数里面

2.command触发事件 要写在mediator里面,逻辑部分最好都写在command 里面

3.model 不存储数据

相关文章

精彩推荐