Errata

Learning Wireless Java

Errata for Learning Wireless Java

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 10
environment variables on second half of the page

With the current version of the J2ME Wireless Toolkit, The MIDPAPI environment
variable should be set to:

'%J2MEWTK_HOME%libmidpapi21.jar;%J2MEWTK_HOME%libcldcapi10.jar'

instead of:

'%J2MEWTK_HOME%libmidpapi.zip'

Anonymous   
Printed Page 34
Table at the bottom

The value of the first column of the first row should read 'microedition.locale'
not 'microedition.local,' according to the MIDP specification.

Anonymous   
Printed Page 34
last paragraph

"The MIDP defines two additional property values ..." - This is misguiding as the
property "microedition.profiles" is already defined by the CLDC, the only difference
being, that this property defaults to null with the CLDC standard and now it must
contain at least "MIDP-1.0".

"... (in addition to the eight in the previous Chapter)" - There were only four.

Anonymous   
Printed Page 35
Figure 3-1

The text is not in synch with the Figure. Moreover, the Figure contains an error.
The arrow that goes from the destroyed state to the Active state should go the
other way according to the text and to the logics.

The same goes for Figure 4-1 on page 43.

Anonymous   
Printed Page 35
1st paragraph

'microedition.local' should read 'microedition.locale,' according to the MIDP
specification.

Anonymous   
Printed Page 64
last paragraph

In the last paragraph, the first method (of the 2 shown) should be 'public void
boolean isColor()' instead of 'public void boolean inColor()'

Anonymous   
Printed Page 66
1st code excerpt

The first line of the code should be
Display display = Display.getDisplay(this);
Notice the this as argument to the getDisplay() method which is missing in the book.

Anonymous   
Printed Page 67
There is a problem with the TextField constraints. There is no such

thing as TextField.NUMBER (also on page 86)

The correct constraint for a TextField is TextField.NUMERIC

Anonymous   
Printed Page 70
1st paragraph

The code snippet of the first paragraph is not a code snippet but the method syntax.

Anonymous   
Printed Page 71
1st code excerpt

The code and the Figure 5-7 and not in synch.
The code says that the Alert's title should be "Error" and "Network Error" is
displayed instead.
According to the code, the Alert's text should be "Network Error. Please try
again later" and we have instead on the Figure "No Connection. Please try again
later".

Anonymous   
Printed Page 71
1st paragraph

In the code snippet, the variable for the alert is called 'modalAert' but is used
afterwards as 'modalAlert'.

Anonymous   
Printed Page 73
1st code excerpt

The code and the Figure 5-8 and 5-9 are not in synch.
The code says that the List's title should be "Edit" but "Message" is displayed
instead...
Moreover, the third item in the List ("Delete") is not what the code says it
should be ("delete"). Notice the lowercase "d".

Anonymous   
Printed Page 73
2nd code snippet

the append() method for the menu object (which is of type List) should take 2
parameters as in:

public int append(String stringPart, Image imagePart)

Anonymous   
Printed Page 86
There is a problem with the TextField constraints. There is no such

thing as TextField.NUMBER

The correct constraint for a TextField is TextField.NUMERIC

Anonymous   
Printed Page 91
last code snippet

The constants used in the code snippet should be of the class Font. So the code
should be 'Font font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN,
Font.SIZE_Medium);'

Anonymous   
Printed Page 124
code

When compiling the code from Example 7-2 the following error occurs:

c:J2mewtkappsCgiGetTestsrcInvokeCgiMidlet1.java:47: cannot resolve symbol
symbol : method writeByte (byte)
location: class java.io.OutputStream
os.writeByte(postmsg[i]);
^

Cause: The method writeByte is not defined in OutputStream, but in DataOutputStream.

Workaround:
...
DataOutputStream os = null;
...
os = c.openDataOutputStream();
...

Now everything should work fine.

Anonymous   
Printed Page 124
wrong URL

The URL
"http://www.javacourses.com/cgibin/getgrade.cgi?idnum=182016"
cannot be found, because it is mistyped (missing hyphen in "cgi-bin"). THe correct
URL is
"http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016".

Anonymous   
Printed Page 200
class overview java.util.Hashtable

Hashtable is shown in pseudocode as "interface", should be "class".

Anonymous