Archive for 九月, 2009

美丽的SuperPanel

曾有需要实现Panel能够最大化最小化及关闭等功能的需求,FlexLib中的MDI可以实现。不过现在有了更好的实现方案:SuperPanel!

Demo:http://brandonmeyer.net/projects/SuperPanelDemo/SuperPanelDemo.html

Source Code:http://brandonmeyer.net/projects/SuperPanelDemo/srcview/index.html

 

Flex单元测试工具:FlexMonkey

今天试用了一把FlexMonkey:
项目做大,需要单元测试工具保证,Flex也不例外,发现一款开源的Flex测试工具FlexMonkey ,基于AIR,Adobe网站上有一篇快速入门教程 http://www.adobe.com/devnet/flex/articles/flexmonkey.html ,
详细可以访问FlexMonkey的网站 http://www.flexmonkey.gorillalogic.com/gl/stuff.flexmonkey.html,
也可以到google网站去下载 http://code.google.com/p/flexmonkey/

FlexMonkey的特点:

  • 记录和回放Flex UI交互过程;
  • UI交互可以被编辑和继续播放;
  • 生成FlexUnit测试用例,而且能被用于非基于FlexUnit的测试框架;
  • 测试可以使用如ANT这样的构建系统来运行;
  • 处理所有的Flex UI事件;
  • 使用Flex Automation API提供原生的Flex应用控制,不需要javascript或者其他浏览器插件;
  • 单元测试可以全部使用AS编写,无需其他编程语言或者特殊目的的脚本语言来开发全面的UI测试套件;
  • 非侵入式,不许修改你的应用源码;

    亲手试用截图:

  •  

    Oracle中建立表空间、User及授权

    好几个月没有碰Oracle了,今天又重新整理了Oracle的环境,遇上了建立用户及表空间等问题,把相应的SQL语句放上来:

    DROP TABLESPACE “TOOLING” INCLUDING CONTENTS AND DATAFILES;
    DROP TABLESPACE “TOOLING_INDX” INCLUDING CONTENTS AND DATAFILES;

    DROP USER “TOOLING” CASCADE;

    CREATE TABLESPACE TOOLING DATAFILE ‘F:\ORACLE\ADMIN\CORTKMRP\MRPDBS.DBF’
    SIZE                                  10M
    AUTOEXTEND ON MAXSIZE                200M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE  64K;

    CREATE TABLESPACE TOOLING_INDX DATAFILE ‘F:\ORACLE\ADMIN\CORTKMRP\MRPINDEXES.DBF’
    SIZE                                  10M
    AUTOEXTEND ON MAXSIZE                200M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE  64K;

    CREATE USER “TOOLING”  PROFILE “DEFAULT” IDENTIFIED BY “TOOLING”
        DEFAULT
        TABLESPACE “TOOLING” TEMPORARY
        TABLESPACE “TEMP” ACCOUNT UNLOCK;
    GRANT “CONNECT” TO “TOOLING”;
    GRANT “DBA” TO “TOOLING”;
    exit;

     

    DataGrid的一些处理小技巧

    一、当行字数超过行宽时,自动扩展行高,只需加入属性:wordWrap=”true”
    如:<mx:DataGridColumn headerText=”描述”
                  dataField=”issue” wordWrap=”true”/> 效果如下图:

    2010-01-13_092715

    二、一般的,当字数超过行宽的时候,将截取字段然后末尾显示为”…”,鼠标移到上方后以ToolTip的方式显示信息。做法很简单,使用ItemRenderer即可,形如:
    <mx:DataGridColumn headerText=”描述”
                  dataField=”issue” itemRenderer=”mx.controls.Label” />
    效果如下:
    2010-01-13_093429

     

    Hibernate Error:org.hibernate.AssertionFailure

    最近频繁遇到Hibernate Error:org.hibernate.AssertionFailure: null id in cn.allobject.db.AReview entry (don’t flush the Session after an exception occurs)

    错误原因:相信很多在看到这个错误的时候都会搜索出很多结果,大致有几个原因:
    1、配置错误,实体配置注释错误,如没有配置逐渐生成方式;
    2、不可为null的字段提供了null值,这也是搜索结果中提供的最多的一种原因;
    3、是因为字段长度不够导致的

     

    可资践用的Adobe Creative Suite 4 Master Collection产品工具箱列表

      
    详情如下:

  • 用于修改图像的Photoshop CS4 / Illustrator CS4
      
  • 创建网站,管理网站内容的Adobe Dreamweaver CS4
  • 用于实时修改正在录制视频的质量的Adobe Premiere Pro CS4/ Adobe OnLocation CS4
  • 用于后期处理和修改特效的Adobe After Effect CS4
     
  • 用于较少视频背景噪音的Adobe SoundBooth CS4
     
  • 充当流媒体服务器角色的Flash Media Server 3.5
     
  • 专门用于开发各种游戏的Flash Professional CS4
     
  • 内置于页面的视频播放器——Flash Player

       
      

  •  

    Flex Effects

    1.旋转

    效果:http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/

    代码:http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip

    2.画布按钮

    http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-added-to-flexlib/

    3.鱼眼工具条

    效果:http://dev.getoutsmart.com/labs/dock/

    代码:http://dev.getoutsmart.com/labs/dock/dockdemo.zip

    4.窗口

    http://www.returnundefined.com/flexmdi/explorer/

    http://window.diaztorres.com/bin-release/test_window.html

    5.切换效果

    http://blogs.digitalprimates.net/codeSlinger/samples/carousel/CarouselTest.html

    6.图片展示

    效果:http://flex.diaztorres.com/samples/aladinotest/aladino_test.html

    代码:http://www.madeinflex.com/img/entries/2008/01/aladino.zip

    7.自定义载入进度条

    http://blog.diaztorres.com/2007/05/mipreloader/mipreloaderdemo.html

    8.Flex Mac弹出窗口

    http://blog.xsive.co.nz/archives/244

    9.果冻特效弹出窗口

    http://blog.sban.com.cn/2008/04/01/jelly-effect-alert-window.html

    10.Alert弹出效果

    http://www.cnblogs.com/taobataoma/archive/2008/01/13/1037082.html

    11.自定义ToolTip

    图片:http://everythingflex.com/flex2/ImageToolTip/Index.html

    视频:http://labs.flexcoders.nl/samples/ToolTip/video/002/

    弹性:http://labs.flexcoders.nl/samples/ToolTip/spring/001/

    12. http://flanture.blogspot.com/2008/05/simple-flex-effects-example.html

    13.果冻效果: http://blog.sban.com.cn/2008/04/01/jelly-effect-alert-window.html

    14.BOOK: http://www.quietlyscheming.com/blog/components/flexbook/

    15:聚光灯效果:

    实例:http://www.rphelan.com/flex/SpotlightDemo/SpotlightDemo.html

    源文件:http://www.rphelan.com/flex/SpotlightDemo/srcview/index.html

    16:放大镜效果:

    实例:http://www.rphelan.com/flex/MagnifyDemo/MagnifyDemo.html

    源文件:http://www.rphelan.com/flex/MagnifyDemo/srcview/index.html

    17:缩放模糊效果:

    实例:http://www.rphelan.com/flex/ZoomBlurDemo/ZoomBlurDemo.html

    源文件:http://www.rphelan.com/flex/ZoomBlurDemo/srcview/index.html

    18:浮雕效果:

    实例:http://www.rphelan.com/flex/SharpenDemo/SharpenDemo.html

    源文件:http://www.rphelan.com/flex/SharpenDemo/srcview/index.html

    19:水波效果:

    实例:http://www.rphelan.com/flex/WaveReflectionDemo/WaveReflectionDemo.html