Scribit Jonathon Jongsma dies 21/01/2006 hora 09:28:
> While I can't speak for anybody else, I've found that contributions
> and criticisms are quite welcome.
OK, great.
> Like all open-source projects, there's a shortage of manpower so
> obviously bugs with a patch attached are likely to be implemented more
> quickly.
I'll try to give such patches ASAP.
> As you're learning, feel free to suggest ways that the documentation
> is unclear or could be improved as well.
Here we go: I'm on the page of the radio buttons, and I have a couple of
difficulties.
First, I can't understand why
m_rb2.set_group(m_rb1.get_group())
can't work... Especially if it is because the group returned by
get_group() is modified by set_group(). If modification by the second or
third button has an impact on the group of the first, I would presume
the data returned is a reference or a pointer.
The problem is, you tell something not obvious but there is no link to
an explanation. Going to the reference is of no help because the
get_group() method has absolutely no documentation.
Second, you continue the tutorial and instead of giving the OO-expected
group.add(m_rb1) or something like, you use Gtk::manage(), of which we
only only know it has a memory management purpose. Again, going to the
reference is of no help, because that function too has absolutely no
documentation...
Why not use:
RadioButtons::RadioButtons()
{
Gtk::RadioButton::Group group;
Gtk::RadioButton m_rb1(group,"button1"),
m_rb2(group,"button2"),
m_rb3(group,"button3");
}
The problem here is the curious beginner will encounter too many
pedagogical pitfalls, IMHO.
BTW, why do the example use:
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
Instead of:
Gtk::Main kit(argc, argv);
Gtk::Window window;
kit.run(window);
The latter syntax is more object oriented, and moreover enables one to
enhance or adapt the event loop by using another object (probably
derived from Gtk::Main).
Curiously,
Nowhere man
PS: for the beginner willing to send patches for the doc, a link to the
CVS or Subversion repository in the beginning of the tutorial would be
great...
--
nowhere man levallois eu org
OpenPGP 0xD9D50D8A
Attachment:
signature.asc
Description: Digital signature