11 2012 档案

摘要:package com.gps.view.component{ import flash.events.Event; import mx.collections.ArrayCollection; import mx.collections.ICollectionView; import mx.collections.IList; import mx.collections.ListCollectionView; import mx.collections.XMLListCollection; import mx.containers.Tile; import mx.controls.Chec. 阅读全文
posted @ 2012-11-23 16:01 刀锋浪 阅读(263) 评论(0) 推荐(0) 编辑
摘要:Flex 元数据标签1、[ArrayElementType]使用ArrayElementType元数据标签可以让你定义数组元素的数据类型。程序代码:[ArrayElementType("String")]public var arrayOfStrings:Array;[ArrayElementType("Number")]public var arrayOfNumbers:Array;[ArrayElementType("mx.core.UIComponent")]public var arrayOfUIComponents:Arra 阅读全文
posted @ 2012-11-22 09:56 刀锋浪 阅读(158) 评论(0) 推荐(0) 编辑
摘要:在TabNavigator中,在creationCompleted中为控件绑定监听事件时,遇到使用对象为空的情况;原因: TabNavigator在初始化后只完成了第一个TAB中的控件的创建... 阅读全文
posted @ 2012-11-20 17:31 刀锋浪 阅读(247) 评论(0) 推荐(0) 编辑
摘要:MX代码:<mx:DataGrid dataProvider="{contactsXML.contact}"> <mx:columns> <mx:DataGridColumn headerText="ID" dataField="@id"/> <mx:DataGridColumn headerText="First Name" dataField="firstName"/> <mx:DataGridColumn headerText=&quo 阅读全文
posted @ 2012-11-19 16:50 刀锋浪 阅读(201) 评论(0) 推荐(0) 编辑
摘要:1Q:使用Flex Bulider3建立一下新的.mxml的页面时默认的背景是蓝色的,请问用什么办法能修改掉此背景颜色,以至于下次创建时背景不是为默认的蓝色的呢?请写出你认为正确的方法. A:这个问题之前还真没想过,查看了下。我直接是从4开始用的。3没怎么用过。 3的答案是:修改sdk\frameworks\projects\framework\default.css里Application的backgroundColor: #0000FF; 4的是根据Adobe Flash Builder 4 Plug-in\sdks\4.1.0\frameworks\themes\Spark中的... 阅读全文
posted @ 2012-11-19 11:23 刀锋浪 阅读(448) 评论(0) 推荐(0) 编辑
摘要:下面有四种方法,估计好用的应该是第三种吧。1.用JAVA自带的函数 public static boolean isNumeric(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){return false; } }return true; } 2.正则表达式 public static boolean isNumeric(String str){ Pattern pattern = Pattern.compile("[0-9]*"); ret 阅读全文
posted @ 2012-11-16 10:17 刀锋浪 阅读(746) 评论(0) 推荐(0) 编辑
摘要:TextInput有个属性叫restrict,设置该属性即可。例如:只允许输入数字和负号:<s:TextInput id="textinput_LOGOLeftW" restrict="0-9\-\+" />只允许输入数字和点号:<mx:TextInput id="txt" restrict="0-9\." />只允许输入数字、英文、汉字:<mx:TextInput restrict="0-9\a-z\^{'[\u4e00-\u9fa5]'}"/&g 阅读全文
posted @ 2012-11-16 10:16 刀锋浪 阅读(282) 评论(0) 推荐(0) 编辑
摘要:<?xml version="1.0" encoding="utf-8"?><s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="118" height="24" creationComplete=" 阅读全文
posted @ 2012-11-15 11:03 刀锋浪 阅读(412) 评论(0) 推荐(0) 编辑
摘要:在网上找的,进行优化完善...myChooseTimepackage com.gps.view.component.nmsDateFiled{ import flash.events.Event; import mx.containers.HBox; import mx.containers.Panel; import mx.controls.ComboBox; import mx.controls.Label; import mx.formatters.DateFormatter; public class myChooseTime extends Panel { public var... 阅读全文
posted @ 2012-11-15 10:59 刀锋浪 阅读(575) 评论(0) 推荐(0) 编辑