| Subcribe via RSS

Tips and Tricks:让Text具有按钮的功用

01月 22nd, 2009 | No Comments | Posted in Flex3, Tips Tricks

通常我们用Button或LinkButton时,里面的Label文字不能换行(当然也可以,稍微要麻烦点),有些时候可以用Text组件来替代,但要让Text组件具有按钮的功能需注意两点:一是当鼠标移到Text上去时呈手势形状,二是鼠标滑入滑出时显示出不同的状态。其实也简单,不过也不是想像那么简单,呵呵。

 

看代码及效果:

   1: <?xml version="1.0" encoding="utf-8"?>
   2: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
   3:     layout="vertical"
   4:     backgroundColor="#CCCCCC"
   5:     creationComplete="init()">
   6: <mx:Script>
   7:     <![CDATA[
   8:         import mx.controls.textClasses.TextRange;
   9:         
  10:         private function init():void {
  11:             myText.text = "Welcome to my blog:" + "\n" +
  12:                             "www.jexchen.com";
  13:         }
  14:         
  15:         private function onRollOver():void {
  16:             var tr:TextRange = new TextRange(myText, false);
  17:             tr.color = 0xff3333;
  18:         }
  19:         
  20:         private function onRollOut():void {
  21:             var tr:TextRange = new TextRange(myText, false);
  22:             tr.color = 0×000000;
  23:         }
  24:     ]]>
  25: </mx:Script>
  26:     <mx:Text id="myText"
  27:         color="#003e7e"  
  28:         useHandCursor="true" buttonMode="true" mouseChildren="false" 
  29:         rollOver="onRollOver()"
  30:         rollOut="onRollOut()"/>
  31: </mx:Application>

点击查看效果:

http://www.jexchen.com/demo/handcursor/HandCusor.html

粗略看看时间到底花费在哪些地方了

01月 22nd, 2009 | No Comments | Posted in Personal

2009-01-22_173051

数据统计使用的是rescuetime,官方站点地址如下:

http://www.rescuetime.com/

BlazeDS与LCDS在功能上的对比

01月 20th, 2009 | No Comments | Posted in BlazeDS, LCDS

√ 代表此功能可用

Features

BlazeDS

LCDS

Data management Services    
Client-Server synchronization  
Conflict resolution  
Data paging  
SQL adapter  
Hibernate adapter  
Document Services    
LiveCycle remoting  
RIA-to-PDF conversion  
Enterprise-Class Flex application services    
Data access/remoting
Proxy service
Automated testing support  
Software clustering
Web tier compiler  
Enterprise Integration    
WSRP generation  
Ajax data services
Flex-Ajax bridge
Runtime configuration
Open adapter architecture
JMS adapter
Server-side component framework integration
ColdFusion integration  
Offline Application Support    
Offline data cache  
Local message queuing  
Real - Time Data    
Publish and Subscribe messaging
Real -time data quality of service  
RTMP tunneling  

 

该对比图来源于:

http://sujitreddyg.wordpress.com/2008/01/31/blazeds-and-lcds-feature-difference/

360Flex及Max2008 sessions

01月 20th, 2009 | No Comments | Posted in 360Flex, ActionScript3, Flex3, MAX2008, RIA, adobe

对于Flex/AIR/BlazeDS/LCDS学习者来说,360Flex及Max2008应该是大家都想参加的会议,但对于大部分人来说,仍是价格不菲,不过还好,最近的360Flex及MAX2008大会的技术演讲大部分均有视频记录,而且效果非常好,相信对大家来说是份不可多得的好资源~~~观看这些视频通常有下面几种方式:

直接通过Adobe.com官方站点访问在线观看:

MAX2008:

通过Adobe Media Player订阅观看,订阅地址如下:

MAX2008:

 

360Flex:

http://sessions.adobe.com/360FlexSJ2008/feed.xml

 

还可以通过以下iTunes地址进行观看:

MAX2008:

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=299639895

最近接触的东西很多…好多还需要消化

01月 16th, 2009 | No Comments | Posted in Flex3, Personal, RIA, Tools

由于所在项目组做的是对公司未来非常重要的产品,加上目前在China这边的开发人员对产品架构和细节都不是特别了解,公司接连派NA和CANADA的同事过来为我们指点,学到了不少东西,有些属于知识掌握方面,有些属工具相关,由于花的时间也不够,好多都一知半解,需要一一消化,有些还需要深入,先将这些相关知识列下来,过段时间再来对比,看吸收掌握了多少,呵呵

Java相关:

Technology Stack:

  • JMS/ActiveMQ-Messaging
  • Spring – Configuration /Wiring
  • Log4J – Logging
  • AspectJ – Auditing, Performance Metrics
  • CXF – WebService
  • Hibernate – JPA

 

Tools

  • Subversion / Jira
  • Maven
  • Junit
  • Cruise Control
  • CheckStyle /Clover
  • Crucible

 

Flex相关:

  • Coding Standard
  • Flex + Blaze/LCDS + Java
  • FlexUnit
  • Flexcover
  • Cairngorm(Current) / Mate(Future)

关于[managed]、[transient]、[RemoteClass]的解释

01月 13th, 2009 | No Comments | Posted in Flex3

当在使用Flex并结合BlazeDS或LCDS进行企业应用开发时,经常会碰到[managed] [transient] [RemoteClass]这三个元标签(metadata tag)的使用,但似乎相关的文档很少([RemoteClass]稍微多点),通过一番搜索,找到了比较细致的解释,附上链接及相关原文,备查:

http://weblogs.macromedia.com/lin/archives/2007/02/how_to_get_sing.html

1. To represent a server-side Java object in a client application, you use the [RemoteClass(alias=" ")] metadata tag to create an ActionScript object that maps directly to the Java object. You specify the fully qualified class name of the Java class as the value of alias. This is the same technique that you use to map to Java objects when using RemoteObject components.

2. You can use the [RemoteClass] metadata tag without an alias if you do not map to a Java object on the server, but you do send back your object type from the server. Your ActionScript object is serialized to a Map object when it is sent to the server, but the object returned from the server to the clients is your original ActionScript type.

3. To create a managed association between client-side and server-side objects, you also use the [Managed] metadata tag or explicitly implement the mx.data.IManaged interface. The [Managed] metadata tag ensures that the managed Contact object supports the proper change events to propagate changes between the client-based object and the server-based object.

More info about this:

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg57899.html

You could simply declare that a particular concrete property on your client type was "transient" using [Transient] metadata - these properties wouldn’t be included when instances were sent back to the server.

http://www.mail-archive.com/flexcoders@yahoogroups.com/msg38984.html

Try tagging the properties that you don’t want managed in your [Managed] AS class as [Transient]. This should prevent changes to them from being logged/committed.

怎样移除当前的Flex License

01月 4th, 2009 | No Comments | Posted in Flex3

当你购买了正版的Flex License后,或要从以前的Standard version升级到Pro版本(或者不小心以前输入过其它的Serial Number)…需要将以前的License移除,使得能输入新的License,则需要移除license.properties这样一个文件,路径如下:

Windows: %ALLUSERSPROFILE%\Application Data\Adobe\Flex\license.properties
Mac: /Library/Application Support/Adobe/Flex/license.properties

将此文件移除后,重新启动Flex Builder,Ok,可以输入新的正版SN了。