User talk:Auria

From WxWiki
Jump to: navigation, search

Hey there, I noticed you made a lot of contributions to the page Creating_Xcode_projects_for_wxWidgets_applications. Since you seem to be in the know, would you maybe consider updating that page to be in keeping with Xcode 3 / 4 and modern OS X releases? Thank you! Ironmagma 14:41, 30 May 2011 (MDT)

Reusable widget page

Hi Auria, you should really derive custom widgets from wxPanel or, better, wxCompositeWindow<wxWindow>, not wxBoxSizer. TAB navigation does (well, should) work with wxPanel and you can use wxNavigationEnabled<> to enable it when deriving from another class. --VZ 14:55, 2 October 2011 (MDT)

Hi VZ, the reason I did it this way is because I just helped a guy on IRC who couldn't figure how to make focus work when using a wxPanel (focus traversal works inside the panel but won't jump from panel to panel). I am not aware of a better way - but of course you may be. In this case feel free to improve the wiki page, as I think this is an aspect that is lacking in the docs

MOC characterization

Hi Auria. With you changed a paragraph that was mostly correct to something that looks biased, to put it mildly. Moc is a code generator, like lex or yacc, rpc/xdr, or any "form builder backend" you can imagine. From a C++ side, the "extensions" you seem to have in mind are simple macros, some (like "Q_SLOTS"/"slots") even defined to nothing. They are compilable by a normal, unmodified C++ compiler. Some macros (like Q_OBJECT) expand to function declarations for which an implementation needs to be provided. Moc can generate the code for a suitable implementation of such functions, i.e. reliefs the user from writing boiler-plate code. The wording you choose ("Qt extends the C++ language with what is called the MOC") is factually wrong, and casts a bad light on the writer, and on what looks otherwise a not-exactly-up-to-date-but-not-obviously-unreasonable comparison.

  • Actually, Auria wasn't trying to update that entry. They are both two very different aspects entirely. Auria obviously just felt like the point regarding virtual function use in Qt is rather pointless to bring up (probably because the same is done with wxWidgets too for the most part... so there's really not any difference between the two there), and also, wxWidgets doesn't make nearly as much use of MFC-style macros these days anymore either. And while she was at it, decided that the difference with how Qt requires the MOC precompiler was worth pointing out (and it definitely is). As far as I'm aware, this is actually technically accurate too. The wiki diff engine isn't smart enough to know that they are two entirely different points. --Tierra 15:01, 13 August 2012 (MDT)
    • I agree that discussing virtual functions is sort of pointless in the context of C++ based frameworks, and I agree there is a tendency towards less macros usage in wxWidgets. However, there's a similar tendency to "depend" less on moc on the Qt side (see e.g. this here for a signal/slot implementation that doesn't require Q_OBJECT/Q_SLOT plus moc code generation) for static (compile-time) connections. For things like fully dynamic connections (i.e. load a plugin, retrieve a root object, introspect it for callable slots) or for safe calls of a function given object address and function name, moc is still useful, but then, there is nothing providing that kind of functionality "out of the box" on the wxWidgets side at all. Anyway, my point was that words like "invade [your buildsystem]" bear a meaning beyond stating a pure technical fact, which might be considered questionable in a piece of writing that claims to be a fair comparison. [Btw, even the technical merit of the statement is questionable. In a cmake based build the "invasion" consists of adding one(!) line "set(CMAKE_AUTOMOC TRUE)", in a qmake based build there is no invasion at all.]
      • Things evolve and my knowledge of Qt may have gotten out of date since I am not regularly using Qt. This is the point of a wiki however so I suggest you can edit the comparison page to point out that Qt too relies less on the MOC.