"wxPython in Action" Erratum

I’ve found an inconsistency between the “wxPython in Action” book and the wxPython implementation, regarding the wx.TextAttr class.

On page 195, 2nd paragraph, the last two sentences state “The class does not have setter methods, since instances of wx.TextAttr are immutable. To change the style of text, you must create an instance.” An inspection of the docs, as well as the class itself, shows this not to be the case. wx.TextAttr has SetXXX methods corresponding to its GetXXX methods, and is apparently mutable.

-Frank

My guess would be that the wx.TextAttr class has changed since the book
was written. The book's examples are using wxPython 2.5.x versus the
current 2.8 after all.

Mike

···

-----Original Message-----
From: Frank Tobia [mailto:frank.tobia@gmail.com]
Sent: Monday, June 25, 2007 5:16 PM
To: wxpython-users@lists.wxwidgets.org
Subject: "wxPython in Action" Erratum

I've found an inconsistency between the "wxPython in Action"
book and the wxPython implementation, regarding the wx.TextAttr class.

On page 195, 2nd paragraph, the last two sentences state "The
class does not have setter methods, since instances of
wx.TextAttr are immutable. To change the style of text, you
must create an instance." An inspection of the docs, as well
as the class itself, shows this not to be the case.
wx.TextAttr has SetXXX methods corresponding to its GetXXX
methods, and is apparently mutable.

-Frank

Frank Tobia wrote:

I've found an inconsistency between the "wxPython in Action" book and the wxPython implementation, regarding the wx.TextAttr class.

On page 195, 2nd paragraph, the last two sentences state "The class does not have setter methods, since instances of wx.TextAttr are immutable. To change the style of text, you must create an instance." An inspection of the docs, as well as the class itself, shows this not to be the case. wx.TextAttr has SetXXX methods corresponding to its GetXXX methods, and is apparently mutable.

Thanks.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!