Build Windows 8 Apps with Microsoft Visual C++ Step by Step

Errata for Build Windows 8 Apps with Microsoft Visual C++ Step by Step




The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page 78
Top of page

The code listing has the destructor for Biz public. The compiler will complain: error C2035: a non-virtual destructor with 'public' accessibility is not allowed for this type 1> a non-virtual destructor must have 'protected private' or 'private' accessibility Fix: change "public: ~Biz(){}" to "private: ~Biz(){}" Also, warning C4419: 'BindableAttribute' has no effect when applied to private ref class 'MyFirstApp::Person'. Consider making 'MyFirstApp::Person' public instead The effect of this is NO text on the screen when you run the application. Fix: change "ref class Biz sealed" to "public ref class Biz sealed" and "ref class Person sealed" to "public ref class Person sealed"

Note from the Author or Editor:
The suggested fix is ok, thanks.

Jeremy Hatcher  May 06, 2013 
Printed
Page 78
Top of page

The code listing has the destructor for Biz public. The compiler will complain: error C2035: a non-virtual destructor with 'public' accessibility is not allowed for this type 1> a non-virtual destructor must have 'protected private' or 'private' accessibility Fix: change "public: ~Biz(){}" to "private: ~Biz(){}" Also, warning C4419: 'BindableAttribute' has no effect when applied to private ref class 'MyFirstApp::Person'. Consider making 'MyFirstApp::Person' public instead The effect of this is NO text on the screen when you run the application. Fix: change "ref class Biz sealed" to "public ref class Biz sealed" and "ref class Person sealed" to "public ref class Person sealed"

Note from the Author or Editor:
The suggested fix is ok, thanks.

Jeremy  May 06, 2013 
Printed
Page 98
Omission

Implementation of the code as written in book will result in no search results found. The sample code does work, however. The difference is that the book never states that in the method: void SearchPeople::Filter_SelectionChanged(Object^ sender, SelectionChangedEventArgs^ e) You need to change 2 instances of IVector<Object^>^ to IVector<Person^>^.

Note from the Author or Editor:
Between step 2 and step 3, in the code of Filter_SelectionChanged you have to replace IVector<Object^>^ with IVector<Person^>^ .

Jeremy Hatcher  May 07, 2013