//调整Flex app的大?br />
function adjustAppSwfSize(){
if (appSwf!=null){
if (getBrowserContentWidth()<minWidth){
if (appSwf.width!=minWidth){
appSwf.width=minWidth;
}
}else if (appSwf.width!="100%"){
appSwf.width="100%";
}
if (getBrowserContentHeight()<minHeight){
if (appSwf.height!=minHeight){
appSwf.height=minHeight;
}
}else if (appSwf.height!="100%"){
appSwf.height="100%";
}
}
}
//得到览器内容区宽度
function getBrowserContentWidth(){
if (document.documentElement && document.documentElement.clientWidth) {
return document.documentElement.clientWidth;
} else if (document.body) {
return document.body.clientWidth;
}
}
//得到览器内容区高度
function getBrowserContentHeight(){
if (document.documentElement && document.documentElement.clientHeight) {
return document.documentElement.clientHeight;
} else if (document.body) {
return document.body.clientHeight;
}
}
]]>hero开发mobile的一些点?http://www.aygfsteel.com/bjwulin/archive/2010/11/11/337816.html不做躁的h不做躁的hThu, 11 Nov 2010 08:46:00 GMThttp://www.aygfsteel.com/bjwulin/archive/2010/11/11/337816.htmlhttp://www.aygfsteel.com/bjwulin/comments/337816.htmlhttp://www.aygfsteel.com/bjwulin/archive/2010/11/11/337816.html#Feedback0http://www.aygfsteel.com/bjwulin/comments/commentRss/337816.htmlhttp://www.aygfsteel.com/bjwulin/services/trackbacks/337816.html
2、目前这个阶D,只有如下lgq行优化Qƈ且具有mobile主题的皮肤。所以徏议目前开发的mobile app使用如下控gQ?br />
Controls
Button
CheckBox
Image (BitmapImage is also supported)
Label
List (supports touch scrolling, includes scroll indicator)
RadioButton / RadioButtonGroup
TextArea
TextInput
Layout
DataGroup
Group
HGroup
Scroller (supports touch scrolling, includes scroll indicator)
TileGroup
VGroup
Charts
All (add mx.swc and datavisualization.swc to library path)
]]>dto是flex应用pȝ的最佛_践之一http://www.aygfsteel.com/bjwulin/archive/2008/06/10/206923.html不做躁的h不做躁的hTue, 10 Jun 2008 06:36:00 GMThttp://www.aygfsteel.com/bjwulin/archive/2008/06/10/206923.htmlhttp://www.aygfsteel.com/bjwulin/comments/206923.htmlhttp://www.aygfsteel.com/bjwulin/archive/2008/06/10/206923.html#Feedback2http://www.aygfsteel.com/bjwulin/comments/commentRss/206923.htmlhttp://www.aygfsteel.com/bjwulin/services/trackbacks/206923.html1、ؓ每一个java dtocd义一个对{的ASc?br />AS: package datasource.dto { [RemoteClass(alias="datasource.dto.CustomerDTO")] public class CustomerDTO { public var firstName : String; public var birthDate: Date; } }
JAVA: public class CustomerDTO { public String firstName; public java.util.Date birthDate; }
2、让AS的DTOcȝ所有属性都是绑定的Q因此,最好是在类的前面加上绑定的元数?font color="#000000"> package datasource.dto { [RemoteClass(alias="datasource.dto.CustomerDTO")] [Bindable] public class CustomerDTO { public var firstName : String; public var birthDate: Date; } }
3、ؓServer和Client的Dtoc都讑֮UUID的属性,便于在表格等集合中排序用,比如Qh员信息中Q按性别排序Q由于性别是不唯一的数据,因此必须加上性别和UUID的组合排序,在性能上,也会有所提升?br /> 4、尽量用getter和setterҎ代替Public属性?br /> 5、可以考虑做Dto的扩展类来实C些定制的目的Q比如在c里面有个计列Q我们可以扩展一个类Q?font color="#000000"> package datasource.dto { [RemoteClass(alias="datasource.dto.CustomerDTO")] public class PortfolioItemExtendedDTO extends PortfolioItemDTO
public function get unrealizedGain():Number { return lastPrice - costBasis; } 而不是在表格的ItemEditEnd事g来实现相似功能?br /> 6、如果存在计列Q可以考虑计算列的l定。可以写一个无效的setterҎ?br />Bindable(event="propertyChange")] public function get unrealizedGain():Number { return lastPrice - costBasis; } public function set unrealizedGain(value:Number):void { // Ain't gonna happen, but Flex won't consider Bindable without the setter }