Pro PHP-GTK Errata

Here is a list of typos, bugs and other issues with the current edition of “Pro PHP-GTK”

Chapter 7 - Page 147 - Listing 7-10 (Thanks Peter McDonald)
Says:

$save = GtkButton::new_from_stock(’Gtk::STOCK_SAVE’);

$reset = GtkButton::new_from_stock(’Gtk::STOCK_UNDO’);

Should say:

$save = GtkButton::new_from_stock(Gtk::STOCK_SAVE);

$reset = GtkButton::new_from_stock(Gtk::STOCK_UNDO);

What changed:

The arguments passed to GtkButton::new_from_stock() should be stock constants. As they are printed (with the surrounding single quotes) they are strings. Removing the surrounding single quotes makes them the constants that were intended.

Chapter 6 - Page 87 (Thanks Carlo Gandolfo)
Says:

PHTP-GTK

Should say:

PHP-GTK

What changed:

There is only one ‘T’ in PHP-GTK and it doesn’t come after the ‘H’.