I counted 129 lines of code that contain alpha-numeric characters in
Ultimate++ version vs 417 in wxWidgets. Thus, the example is 3 times
shorter in Ultimate++.
In its defense, wxWidgets says that the comparison "isn't really
fair" :
http://www.wxwidgets.org/wiki/index.php/
WxWidgets_Compared_To_Other_Toolkits
because the wxWidgets sample is over-engineered.
Instead, from looking at the examples, it seems that wxWidgets
requires a lot of annoying boilerplate code, messing with IDs and
manual memory management. If this is not the case, I would very much
like to see a 129 line version using wxWidgets :-)
P.S. I think Ultimate++ has a Mac version, but it's Unix X (I could be
wrong)
I don't know why you post this here, but it should be trivial
to make the bombs samples shorter using wxWidgets.
Which, of course, shows, proves and means exactly nothing.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org
In this example it does look like wxWidgets is indeed much more complex
and less C++ oriented..
It can be confusing when looking at it at first glance.
Nonetheless, it indeed doesn't prove anything since U++ is still in Beta
and appears to be 'a new kid on the block'.
When looking for a X-Platform C++ lib, i would definitly forget about it
since it doesn't look stable to me (yet).
Albert van Peppen
-----Oorspronkelijk bericht-----
Van: Robert Roebling [mailto:rob...@roebling.de]
Verzonden: maandag 29 januari 2007 10:04
Aan: wx-u...@lists.wxwidgets.org
Onderwerp: Re: Ultimate++
On Jan 29, 1:03 am, rob...@roebling.de ("Robert Roebling") wrote:
> > Ultimate++ has a page where it compares itself to wxWidgets,
> > using "Bombs" example program.: [...]
>
> > I counted 129 lines of code that contain alpha-numeric characters
> > in Ultimate++ version vs 417 in wxWidgets. Thus, the example is
> > 3 times shorter in Ultimate++.
> I don't know why you post this here, but it should be trivial
> to make the bombs samples shorter using wxWidgets.
3 times shorter or just shorter?
> Which, of course, shows, proves and means exactly nothing.
I could knock out Mike Tyson in one round, but I'm not going to do it,
because violence is not the answer :-P
> Robert wrote:
>
> > > Ultimate++ has a page where it compares itself to wxWidgets,
> > > using "Bombs" example program.: [...]
> >
> > > I counted 129 lines of code that contain alpha-numeric characters
> > > in Ultimate++ version vs 417 in wxWidgets. Thus, the example is
> > > 3 times shorter in Ultimate++.
>
> > I don't know why you post this here, but it should be trivial
> > to make the bombs samples shorter using wxWidgets.
>
> 3 times shorter or just shorter?
The version in Ultimate++ (stripped of comments etc) has 229 lines
and my short version (below) using wxWidgets has 262 lines. The only
technical difference (in the sample) seems to be that Ultimate++
doesn't need IDs since it combines the line, which defines e.g.
a menu and the line which binds it to the code. Whereas in
wxWidgets, we now write
const int ID_EXIT = 101;
file_menu->Append( ID_EXIT, wxT("Exit") );
Connect( ID_EXIT, ..., MyFrame::OnExit ).
we could probably add an overload that does this
file_menu->AppendAndConnect( wxT("Exit"), ..., MyFrame::OnExit );
using wxNewId() internally. As I said before, all this means
and proves nothing. Noone chooses a toolkit for saving
14% typing since all that is done using GUI editors anyway.
> > Which, of course, shows, proves and means exactly nothing.
>
> I could knock out Mike Tyson in one round, but I'm not going to do
> it, because violence is not the answer :-P
See attachment. Robert: 1, Tyson: 0.
Robert
First of all, thanks very much for the new version.
I had to make the following changes:
1. wx.h -> wxprec.h (obscure linker warning went away)
2.
wxCoord tmp_x, tmp_y;
w.GetTextExtent(txt, &tmp_x, &tmp_y);
wxSize tsz(tmp_x, tmp_y);
instead of w.GetTextExtent(txt); (compiler error - I'm guessing you
use a newer library version)
3. field.Alloc -> field.resize (runtime assert failure)
> we could probably add an overload that does this
>
> file_menu->AppendAndConnect( wxT("Exit"), ..., MyFrame::OnExit );
:)
First of all, thanks very much for the new version.
I had to make the following changes:
1. wx.h -> wxprec.h (obscure linker warning went away)
2.
wxCoord tmp_x, tmp_y;
w.GetTextExtent(txt, &tmp_x, &tmp_y);
wxSize tsz(tmp_x, tmp_y);
instead of w.GetTextExtent(txt); (compiler error - I'm guessing you
use a newer library version)
3. field.Alloc -> field.resize (runtime assert failure)
> we could probably add an overload that does this
>
> file_menu->AppendAndConnect( wxT("Exit"), ..., MyFrame::OnExit );
:)
On 30 jan, 22:25, rob...@roebling.de (Robert Roebling) wrote:
> wxbombs.cpp
> 7KTélécharger
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscr...@lists.wxwidgets.org
> For additional commands, e-mail: wx-users-h...@lists.wxwidgets.org
Thanks, updating U++ website with this vestion ASAP.
--
Mirek Fidler
U++ team leader. http://www.ultimatepp.org
vestion->version... (typo)