程式扎記: [ NetBeans 常見問題 ] 如何解決 netbeans 6.8 開發EXTJS時庫不存在的問題?

標籤

2010年7月30日 星期五

[ NetBeans 常見問題 ] 如何解決 netbeans 6.8 開發EXTJS時庫不存在的問題?


參考自 這裡
前言 :
在開發 ExtJS 項目的時候需要配置環境, 加載extjs 3.0 的庫. 但剛下載的 NetBeans 預設並無相關 JavaScript 的庫.

解決方法 :
在Google 之後可以發現 這篇文章 並說明方法如下 :
* I am using NetBeans 6.5 and Ext JS 2.2.
1. NetBeans menu "Tools" and then submenu "Libraries"
2. Click the "New Library..." button
3. Set Library Name: as "ExtJS2.2" and Library Type: as "JavaScript Libraries" and then click "OK"
4. Click the "Add Zip..." button
5. Select the location of where you have your "ext-2.2.zip" file
6. Click "OK" to close the Library Manager window.
* Now, one can hook up the new Ext JS library to the project you would like code completion with
1. Right click the proposed project and select "Properties"
2. Select the "JavaScript Libraries" Category
3. Click the "Add..." button to open up the "Add JavaScript Libraries" window
4. ExtJS2.2 should be listed as an available JavaScript Library
5. Check the Add box for the ExtJS2.2 Library and click "OK"
6. The Extracting JavaScript Libraries window should pop up and it should take a good couple minutes to extract the Ext JS libraries for use with 7. NetBeans to activate the code completion functionality.
7. Click "OK" to close the Project Properties window
8. Open up a javascript file in your project and start with typing "Ext."
9. Notice how the code completion is activated and one may now scroll thorugh the language and enjoy NetBeans taking care of some of the guess work we coders must deal with when coding to multiple APIs and various syntax oddities.

但使用以上方式時在第3步的時候我們根本就找不到 JAVASCRIPT LIBRARIES 這個下拉選項. 一開始.我們發現這個版本的plugin 非常的少. 於是我們添加一個源. menu-->plugins-->settings-->add
取一個名字. 然後添加以下URL.
http://updates.netbeans.org/netbeans/updates/6.8/uc/m1/dev/catalog.xml.gz

這時候我們可以看到有效的插件數上升, 接著在6.8中 TOOLS-->PLUGIN 的升級源中打開有效的插件這個選項卡,在列表中找到javascript 開頭的一個JQUERY 庫.勾選後安裝完畢. 這時候我們再到 TOOLS-->LIBRARIES 彈出窗中可以看到JAVASCRIPT LIBRARIES . 這樣.我們新建一個 EXTJS3 ,然後指定你的EXTJS3的安裝路徑到這兒了. 最後在右邊的 reserved tab 選擇如下文件 :


至此我們NETBEANS6.8就可以開發ExtJS 3了.

補充說明 :
Ext JS Download page
Ext JS is a cross-browser JavaScript library for building rich internet applications. It includes:
- High performance, customizable UI widgets
- Well designed and extensible Component model
- An intuitive, easy to use API
- Commercial and Open Source licenses available
This message was edited 2 times. Last update was at 25/06/2010 10:45:10

沒有留言:

張貼留言

網誌存檔