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