RIA Shanghai 上海

a Shanghai RIA community focusing on Flex, ActionScript and Flash

This is a public Group - Asia  public

Latest Articles by RIA Shanghai 最新文章

  • RIA Shanghai | Adobe上海用户组 blogsSDK 3.4新变化之一 Flex SDK 3.4 List/DataGrid/TileList/Menu/Tree throws Error if selectedItem is not in the dataprovider - Nov 12

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    png-0004 将原有的Flex project的SDK从3.2改到3.4后,如果你的代码足够多,那么这个问题你很可能会遇到,如下面是我的代码:

    _selectionList = new List(); _selectionList.width = 360; _selectionList.dataProvider = _selectionDataProvider; _selectionList.selectedItem = _valueInput; _selectionList.addEventListener(ListEvent.CHANGE, onListSelectionChange);

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogsArray(*) Cast还是创建?Array(*) Cast or Construct? - Nov 11

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    Search_01 在ActionScript有两种type cast: var c1:ArrayCollection = c as ArrayCollection; var c2:ArrayCollection = ArrayCollection(c); 前者中c可以为null, 而后者要求c不可为null,否则throw Error.

    如下代码:

    var obj:Object = [1, 2, 3]; trace(Array(obj).length);

    运行后输出代码为3还是1?

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogs一份代码完美运行于两种环境 Single AS Code Source that Runs Perfectly in Browser and AIR - Oct 23

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    In Flex, you never need two different sources to build your application in browser and in AIR. For example:

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogs为自动创建的Objects传值 Pass Value to Auto-Created Objects with DataGrid ItemEditors as an Example - Oct 23

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    diannaowenjian-03 有些objects是无法确定何时被创建的,给这些自动创建的objects传值有一定的挑战。我们假设自动生成的objects为o1, o2, … 其class为O,另外一组可以非自动生成的objects a1, a2, … 对应class为A。目的:我们需要o2来获取a2的reference. 可以考虑的方法有:

    - 我们创建一个hash map, 而且此hash map是Singleton, 将a1, a2 …等都放进去,这样在任何地方,都可以通过HashMap.singleton.getA(“2”)类似的方法获取到a2. 实际上这就是设计模式Service Locator的一种典型应用;设计模式并非是万能药,这里使用它有点用牛刀杀鸡的感觉。这里还有一个问题是,要a2来传递”2“给service locator, 此”2“本身也得被传入,所以没有解决根本问题。

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogsDataGrid列拥挤问题 Solve Crowded DataGrid Columns Problem - Oct 22

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    computer-personal-05 如果DataGrid上面的列过多,它会自动收缩列的宽度,这种情况下我们更需要的是scrollbar。解决这个问题很简单:

    datagrid.horizontalScrollPolicy = ScrollPolicy.AUTO;

  • RIA Shanghai | Adobe上海用户组 blogsWTP加载Web Project失败解决 WTP Failed to Load Project with Tomcat Bug - Oct 12

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    The more you use a program, the more bugs you will find in it. This is the case with Eclipse, WTP in particular. If the application server (I use Tomcat) starts and yet the web module is not loaded, you should:

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogs加载显示浅析 Deep into loading screens - Aug 13

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    macromedia_luiscds shockwave128x128 This article gives ideas for developing loading screens for Flex applications. The loading sequence for a typical RIA application could be:

    [0. Downloading the runtime binary] -> [1. Application initializing] -> [2. Application started]

    For Flex/flash application, the preloader will be displayed at step 0. At step 1, application is running and it's up the application to display any loading screen. One of our RIA app needs to load metadata from server thus we do need a loading screen at step 1.

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogs设计模式之可取消的选择 UI Pattern: Cancellable Selection - Jul 07

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    softwareD Pattern name 模式名: Cancellable Selection   Classification 分类: Behavioral

    Motivation: 在多对象共享同一个编辑器(editor)或者在任何时间仅允许一个编辑器的情况下, 如果当前对象尚未保存, 界面不应该直接转换到新的对象 - 至少应该给用户警告并提示选择的机会. 例如: 多个tabs, 每个tab页面有可编辑的对象; 一个tree, table或者list上显示所有文件, 旁边为唯一共享的编辑器.

    Approach:

    将selection明确分成两个阶段 - 一是试图选择的阶段, 此阶段的任务是询问所有listeners是否同意选择; 如果第一阶段一致同意, 第二阶段才是实施真正的选择.

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogs获取Throwable异常 Catch Throwable Instead of Exception - Jun 27

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    AQUA ICONS SYSTEM QUESTION MARK 很多程序员习惯地用下面地方法打印异常:

    try {  ...}catch(Exception e){  e.printStackTrace();}

    实际上, 这是不足够的. 请看下面的例子:

    閱讀全文

  • RIA Shanghai | Adobe上海用户组 blogsPermGen内存用尽错误 Fixing java.lang.OutOfMemoryError: PermGen space - Jun 26

    Source: RIA Shanghai | Adobe上海用户组 blogs by Jack Li

    JAVA 在进行Eclipse的插件开发时如果直接运行Eclipse Application, 下面错误往往时常发生:

    java.lang.OutOfMemoryError: PermGen space

    错误原因

    默认的情况下, Sun JRE的class loader(类的加载器)只能使用最多64M的内存, 如果有大量的类, 所需内存超过这个数字, 以上错误就产生了.

    閱讀全文

Recent Blog Entries

  • Entry posted 11/10/08 by Jack_L in Blog public

    Note: this is not the official Adobe coding convention spec. In fact, it is our own version.

    Download the file in PDF format:

    English edition | 中文版

     
    Table of Contents

    1    Introduction   
    1.1    Convention   
    1.2    Recommendation importance   
    1.3    Major differences with traditional code conventions   
    1.4    Major difference with Adobe conventions   
    2    Naming Conventions  


    2.1    General naming guidelines   
    2.2    Package names   
    2.3    Class names   
    2.4    Interface names   
    2.5    Variable/property names   
    2.6    Function names   
    2.7    Event names   
    2.8    Namespace names   
    3    File Format   
    3.1    File name   
    3.2    File content   
    4    Statements   
    4.1    Packages and imports   
    4.2    Declarations   
    4.3    Control Flows   
    4.4    Literals   
    4.5    White spaces   
    5    Documentation & Commenting   
    5.1    General rules   
    5.2    ASDoc   
    6    ActionScript Best Practices   
    6.1    General Programming   
    6.2    Logging   
    6.3    Testing with FlexUnit   
    6.4    Updating Flex SDK Regularly   
    Appendices   
    ASDoc tag reference

    more...

Upcoming Events

No results

Active Discussions

No results

Assorted Media Gallery Posts

No results

Recently Posted References

No results

Search Group Posts

Contact Us

No results

Members

  • 1-13 of 13

Adobe Announcements

  • We made a big change to the Adobe Groups homepage today. Now, when you log in, you'll see a list of all groups that you have joined right there on the page.

    No more bookmarking groups or having to go to your profile page to see the full list!

Recently Posted Job Listings

No results

Sponsors

No results