WX_DECLARE_LIST usage

Vadim Zeitlin vadim at wxwindows.org
Mon Oct 2 08:00:12 PDT 2006


On Mon, 02 Oct 2006 10:53:33 -0400 Chad Wagner <chad at chadawagner.com> wrote:

CW> Thanks for the quick response, unfortunately either I was half asleep  
CW> when I posted or I'm already showing my newbieness.  You're right,  
CW> the WX_DEFINE_LIST looks fine to me as well, what I meant to say is  
CW> that WX_DECLARE_LIST is the culprit.

 Hmm, indeed, WX_DECLARE_LIST requires semicolon. I wasn't aware of it,
sorry.

CW> For now I will include the semicolon explicitly, and certainly can  
CW> live with it.

 This is probably the wisest course of action, adding a semicolon to it now
is going to provoke warnings or worse (I remember that HP-UX aCC used to
flag extra top-level semicolons as errors, although I don't know if it
still does) in all existing code without any real gain.

CW> I am just trying to get my head around all this wx  macro stuff.

 This is not (by far) the prettiest nor, let me assure you, the most
representative part of wx. Luckily, chances are that you don't need to deal
with it at all as unless you really need to write code which compiles on
all platforms which wx supports I'd recommend just using standard C++
library classes (e.g. std::vector, std::list, ...) instead of wx
facilities.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list