`
kooii
  • 浏览: 37702 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
1. 用匿名函数把脚本包起来,可以有效控制全局变量,避免冲突隐患(function(){    })();2. 定义全局变量实现匿名函数之间的通信var GLOBAL = {}, 在每个匿名函数中添加命名空间GLOBAL.A={};GLOBAL.A.str="a";GLOBAL.B={};GLOBAL.B.str="b";定义namespace函数GLOABL.namespace=function(str){    var arr = str.split(","),o=GLOBAL;    for(i=(arr[0]="GLO ...
Ehcache 是现在最流行的纯Java开源缓存框架,配置简单、结构清晰、功能强大,最初知道它,是从Hibernate的缓存开始的。网上中文的EhCache材料 以简单介绍和配置方法居多,如果你有这方面的问题,请自行google;对于API,官网上介 ...
当用IE上传文件通过ajaxForm提交时,返回的又是json对象,IE会接收不了返回的值。可以将结果转成String传给前台。具体问题已经在网络上找到造成原因及解决方案。依附以下链接 http://stackoverflow.com/questions/11233610/jquery-ajax-form-with-file-upload-not-working-in-ie
Spring JMS可以帮助开发人员快速的使用MQ的发送与接收,在异步接收方面,Spring 提供了MessageListenerContainer的容器接收消息。通过研究源码发现DefaultMessageListenerContainer是支持动态改变messageSelector的。在DefaultMessageListenerContainer 中有个cacheLevel的属性默认是4,把它改动到2或1或0,数字分表代表 public static final int CACHE_NONE = 0;public static final int CACHE_CONNECTION = ...
在公司做的一个share session,附件包含HTML 5 ppt+ Demo, 分享给大家。 ppt内容已基本包含HTML 5的新特性, 是《HTML 5 与 CSS 3 权威指南》的读书总结。
最近纠结与买手机,出于各方面的考虑,对多款性价比高的手机进行了对比。首先由于已经拥有ipad,所以不考虑iphone。就选定了诺基亚Lumia 920,由于此机价格过高,只能默默关注。 其实说实话, Lumia800/900 如果不考虑系统升级不到Win8还是可以入手的,使用起来非常Good。之后只能转向Android机。 我陆陆续续关注了以下几款 1. Google Nexus 4 真心的性价比超高,可惜美版虽只需$299,但由于国内缺货现还需3000左右,不值得。但又不想等,至少得年后才能买到便宜的价格吧   2. 华为荣耀四核爱享版 这款性价比也不错,价格只要1788元,外观一 ...
一、使用自带的字体 1. 在web项目的lib中加入iTextAsian.jar包, 不加会有Exception   2. 在jrxml中加入如下代码     <style name="STSong" pdfFontName="STSong-Light" pdfEncoding="UniGB-UCS2-H"     isPdfEmbedded="true"/>    在相应的textField指定style为"STSong" 注意: 在文件中测试直接输入中文,有时也会不显示 ...
 mx|ToolTip       {           borderStyle:ClassReference("myBorder");       }   查看ToolTipBorder这个类的updateDisplayList(),可以得知通过设置borderStyle为自定义的Border类,可以继承 ToolTipBorder, 或模仿重写一下.   ToolTipBorder的源码   override protected function updateDisplayList(w:Number, h:Number):void { s ...
转帖: 写的不错的组件,自己可以根据自己的需求再进行改变~ http://hillelcoren.com/flex-autocomplete/
转自http://flex.org/get-started/ 英文很容易看懂就不翻译了, 里面列举的都是个人亲身体验过来的。的确是不错的学习之路。 可以少走弯路。 Get Started Step 1: Install Flash Builder Download the Flash Builder 60 day trial here : If you are already using Eclipse, download the plugin version, run the installer and make sure you install Flash Builder ...
1.FlexPMD : http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD+Eclipse+plugin   function: Unused code (functions, variables, constants, etc.) Inefficient code (misuse of dynamic filters, heavy constructors, etc.) Over-complex code (nested loops, too many conditionals, etc.) Over-long ...
private function numberSortCompareFunction(field:String):Function { return function (obj1:Object, obj2:Object):int { var value1:Number = (obj1[field] == "" || obj1[field] == null) ? null : new Number(obj1[field]); var value2:Number = (obj2[field] == "" || obj ...
如标题所说,直接上代码 protected function changeHandler(event:TextOperationEvent){ //通过UIComponent的measureText方法得到TextLineMetrics,它的width就能得到输入框字符所占的真实width var charsWidth:int = txtInput.measureText(txtInput.text).width; if (charsWidth > txtInput.width) //与textinput的width进行比较 { txtInput.toolTip = txtI ...
public static function seperateFormat(num:String, precision:int):String { if (!isNaN(Number(num))&&precision>=-1) { var input:BigDecimal = new BigDecimal(num); var output:String; if (precision != -1) { output = input.divideScaleRound(new BigDecimal(1), ...

弹出框的位置

    博客分类:
  • Flex
private var mainApp:DisplayObject = FlexGlobals.topLevelApplication as DisplayObject; PopUpManager.addPopUp(youWindow, mainApp); PopUpManager.centerPopUp(youWindow);  让所有的弹出框的父类都是主程序
Global site tag (gtag.js) - Google Analytics