Pay for Hesitation: Flex Builder 3 制作.swc時的一個bug

Pages

2010年3月26日 星期五

Flex Builder 3 制作.swc時的一個bug

切記!!

在制作.swc時,
千萬不要將寫好的 ExClass.as直接移入flex library project 的src目錄下。
否則編譯成.swc後,

在flex builder 中的其它project 即使已將該swc加入build path,
但在import ExClass及使用ExClass下的functions時,不會有任何autocomplete的資訊。
(但事實上compiler是有import的,並且可使用ExClass下的 function)

所以最好的方法是, 在flex library project中先create 一個空的ExClass.as,
然後再把原本已經寫好的ExClass.as 中的codes copy/paste過去.


錯怪它了!!
上面的問題, 是因為ExClass.as 中使用了Vector的instance

Vector本身在Flex Builder3中使用時, 就無任何autocomplete 的資訊.
但沒想到它居然會讓使用它的class (ExClass) 也失去在其它class(import ExClass的class)中的autocomplete資訊.


2010/8/17
Flex Builder 4 沒有上述問題.


沒有留言: