@import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
------------------------------------------------------------------------------------------------------------------------
--------------------------------------- 第二版的勘誤表 --------------------------------------------
------------------------------------------------------------------------------------------------------------------------
- 封面廣告的第一條“....,以最新的Eclipse3.2為寫作版本”。
年初結稿時是這樣的,不過現在最新的版本是Eclipse3.3,軟件更新真是太快了。
- 封面廣告的第三條“重寫了API,....”。應該為“根據新的API重寫,...”
- 封底的折頁廣告。“第二批:”第四本“<<Eclipse開發從入門到精通(第2版)>>”。多了“開發”兩字
------------------------------------------------------------------------------------------------------------------------
--------------------------------------- 第一版的勘誤表 --------------------------------------------
------------------------------------------------------------------------------------------------------------------------
對第一次印刷的勘誤表
頁碼
|
錯誤位置
|
修改后的文字
|
|
前言III,第四行未尾添加進如右所示文字 |
感謝網友ksafe、盧俊、yasker、konhon、limux等校正了本書中的錯誤。 |
11
|
頁中間
|
錯:
Edition for Eclipse3.0GA&3.0.1
對:
V2.1.0 GA
(
2004.08.19
)
|
13
|
第一段的末尾
|
錯:足夠開發使用了。)
對:足夠開發使用了;如果選
professional
項,則只能暫時使用幾天)
|
27
|
從圖
4.26
往下的第
4
行
|
錯:
Ctrl+Alt+O
對:
Ctrl+Shift+O
。
|
31
|
第
3~7
行
|
錯:
Shift + Ctrl
對:
Ctrl + Shift
(排版說明:將
Ctrl
和
Shift
兩單詞交換一下位置,共五對)
|
54
|
第
7
行
|
錯:要想得到完整的代碼請查閱本書隨書光盤中的例程。
對:要得到程序的
import
引用,或完整代碼,請查閱隨書光盤中的相應例程。
|
第
57
頁
中上部有灰色背景的代碼
重新調整
|
public
class
HelloWorld extends MouseAdapter{
//
或
implements MouseListener
public
static
void
main(String[] args) {
new HelloWorld().createContent();
}
private
void
createContent() {
……
Text text1 =
new
Text(shell, SWT.BORDER);
Text text2 =
new
Text(shell, SWT.BORDER);
text1.addMouseListener(
this
);
text2.addMouseListener(
this
);
……
}
public
void
mouseDoubleClick(MouseEvent e) {
MessageDialog.openInformation(
null
, "", "Hello World");
}
}
|
89
|
"
圖
10.23"
右圖下標
|
錯:
horizontalIndent=9
對:
horizontalIndent=90
|
114
|
倒數第三行
|
錯:
TablItem
對:
TableItem
(排版說明:緊挨著,共有兩個
TablItem
)
|
144
|
中間(倒數第
20
行)
|
錯:正數,則
obj1
移到
obj2
之間
對:正數,則
obj1
移到
obj2
之前
|
148
|
中間部份,本頁第
17
行
|
錯:
tv.remove(o);
/*
*
這里只是從界面表格將其去除掉。
*
如想從數據庫里刪除還得寫相應的數據庫刪除代碼。
*/
對:
tv.remove(o);//
從界面上刪除
//
從數據模型的
List
容器中刪除
List list = (List)tv.getInput();
list.remove(o);
//
如想從數據庫里刪除還要寫相應的數據庫刪除代碼
|
153
|
第
7
行
|
錯:
ctv.remove(o);
對:
ctv.remove(o);//
從界面上刪除
((List)tv.getInput()).remove(o);//
從數據模型的
List
容器中刪除
|
153
|
第
17
行
|
錯:
tv.remove(o);
對:
tv.remove(o);//
從界面上刪除
((List)tv.getInput()).remove(o);//
從數據模型的
List
容器中刪除
|
346
|
中間(第
17
行)
|
錯:
super.dispose();
Context.getInstance().removeLogoffListener(this);
Context.getInstance().dispose();
對:
Context.getInstance().removeLogoffListener(this);
Context.getInstance().dispose();
super.dispose();
(排版說明:要保證三行向右對齊。原來的第三行后縮了幾個空格,是錯的。)
|
416
|
中下部(倒數第
11
行)
|
錯:
Lomboz3.1.0
對:
Lomboz3.0.1
|
421
|
第
8
行
|
錯:圖
23.12
是安裝完成后的
Eclipse
目錄結構。注意:
lomboz
目錄下還有一個
eclipse
子目錄。
對:
圖
23.12
是安裝完成后的
Eclipse
目錄結構。
注意:
lomboz
目錄下還有一個
eclipse
子目錄,這是采用
Link
式插件安裝方法比較容易忽略的一個要點。
(排版說明:將“注意:
lomboz
目錄
.....
”另起一行,并且加上灰色背景)
|
475
|
圖
26.3
下的第一行
|
錯:
Hibernate-2.7.1c.zip
對:
Hibernate-2.1.7c.zip
|
對第二次印刷的勘誤表
書中頁碼
|
錯誤位置
|
修改后的文字
|
|
第27頁“圖4.26”下10行
|
錯:空缺了步驟(3)
對:將步驟的編號依次上移一位
|
|
第116頁倒數6-9行
|
錯:
/*
* 創建一個Table對象,在式樣里設置它可多選,全列選擇。
* 并用兩條語句設置它顯示表頭和表格線
*/
對:
/*
* 創建一個Tree對象
*/
|
|
P346倒數第14行
|
錯:addLogonListener
對:addLogoffListener
|
|
第448頁倒數第五行錯了。
|
錯:
property是關鍵的屬性,它必須對應于LogonAction類中的一個字段。
對:
property是關鍵的屬性,它必須對應于UserForm類(ActionForm)的一個字段
|
Feedback
P449 第10行
錯:“和第24章的logon.js”
對:“和第24章的logon.jsp”
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-01-18 09:37 by
P458 第10行
錯:“在Action程序中使用動態ActionFormt”
對:“在Action程序中使用動態ActionForm”
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-01-18 09:40 by
P468 倒數第19-22行,有兩行重復。刪除重復的倒數第19、20行
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-03-02 07:21 by
P332 最后一句:
IFolderLayout button = layout.createFolder("button",IPageLayout.BOTTOM, 0.8f, editorArea);
應該是
IFolderLayout button = layout.createFolder("button",IPageLayout.BOTTOM, 0.8f, "left");
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-04-06 23:06 by
p431第二行
type="javax.sql.DataSourcer"/>
應為
type="javax.sql.DataSource"/>
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-04-15 10:21 by
感謝陳勇(chenyong301@***.com)的指出錯誤
錯誤:P231 的IEditorInput沒有getEditorID()方法]
解決方法一:
(1)加一IEditorInput的子接口MyEditorInput,在該子接口加一個getEditorID()方法。然后將本書的所有EditorInput由implements IEditorInput改為"implements MyEditorInput"。
(2)最后在使用的時候這樣
String key=""+list.getSelectionIndex();
MyEditorInput editorInput=(MyEditorInput)list.getData(key);
String editID=editorInput.getEditorID();
解決方法二:
利用IEditorInput中顯得多余的getName,把ID放到里面,最后用下面語句得到edtorID---String editID=editorInput.getName();
# re: 《Eclipse從入門到精通》勘誤表 回復
2006-04-15 10:30 by
感謝陳勇(chenyong301@***.com)的指出錯誤.
錯誤:P173頁,在無子結點(如書中的“桂林”)下增加一個子結點時,無法展開。
錯誤分析:沒有把數據加入到數據模型而導致的,當時只追求完成界面效果又沒有做詳盡的測試而導致這個BUG。在實踐編程中,必須將數據加入到setInput的數據模型中,然后再refresh或add到界面。刪除結點也同樣應該從數據模型中刪除。
解決方案(分三步):
(1)把最后三行
if (!tv.getExpandedState(obj))
tv.expandToLevel(obj, 1);
tv.add(obj, newEntry);//增加結點
改為如下(加一行,并換一下順序)
((ITreeEntry) obj).getChildren().add(newEntry);
tv.add(obj, newEntry);//增加結點或者tv.refresh(obj, true);
if (!tv.getExpandedState(obj))
tv.expandToLevel(obj, 1);
(2) CountryEntity
private List cities; 改為 private List cities = new ArrayList();
(3)CityEntity
private List peoples; 改為 private List peoples = new ArrayList();
說明:第2、3步改動,是為了防止第1步程序中的((ITreeEntry) obj).getChildren()返回null,從而導致null.add(newEntry);這樣的錯誤。