Hi
Surely we can improve the common experience by adding some utility
methods to the API?
We should be able to shrink the code snippet to:
MenuBar bar = new MenuBar();
Menu.Section section = bar.getSections().add("default");
section.addItem("Open...");
Frame frame = new Frame("Menus", bar);
frame.open( display );
or just
MenuBar bar = new MenuBar();
bar.addItem("Open...");
Frame frame = new Frame("Menus", bar);
frame.open( display );
for the common case where there is only one section (i.e. one would be
auto-created).
What is the general feeling about adding these kinds of utility methods?
Too many of them can create clutter, but a small handful can provide a
very valuable helping hand to people beginning to use Pivot.
Regards,
Noel Grandin.