3.1 A Message from Dr. Scott Steinman
Here's a note describing some errors in the book and some suggestions for improving the code. I've reprinted it in its entirety:
1. You state that the Me operator is a requirement for accessing a class' properties or methods. This is not true, even in RB 2005/6. The property or method name can be used without Me. Whether or not to use Me is sometimes like using Self -- some people use them all the time, others only when absolutely necessary to avoid namespace conflicts.
2. On page 112, the Properties.get method will not work as shown. The first branch of the if statement does not return s. This is also true for the versions of Properties.get on page 113.
3. Since default method parameters are available, couldn't the code on page 133 be written to be more concise? It currently is written as:
Function ReadLine() as String dim s as String s = InputStream.ReadLine me.SourceLines.Append( s ) return s End Function Function ReadLine( Enc as TextEncoding ) as String dim s as String s = InputStream.ReadLine( Enc ) me.SourceLines.Append( s ) return s End Function
This contains redundant code and can be refactored into a single method as follows:
Function ReadLine( Enc as TextEncoding = nil ) as String| dim s as String if Enc <> nil then s = InputStream.ReadLine( Enc ) else s = InputStream.ReadLine end if me.SourceLines.Append( s ) return s End Function
4. On page 147, paragraph 3, line 2- "it represents the actually application" is a typo.