Go Down

Topic: Vertical scrolling of menu items in IDE versions 1.0.3, 1.0.5 and 1.5.2 (Read 4363 times) previous topic - next topic


In the Arduino IDE running on Linux 64-bit I am having some problems with the vertical scrolling functions for certain menu categories.  In version 1.0.3 it was Sketch/Import Library where having a lot of libraries meant that I couldn't pick a selection that wouldn't initially be part of what was displayed as an option.  I could for File/Examples in 1.0.3, but not adding libraries to a sketch.

In version 1.0.5, which I installed today, the problem with scrolling now happens with File/Examples.  Version 1.0.3 will allow me to scroll through all of the examples, but version 1.0.5 will not.  This version also has the same scrolling problem as 1.0.3 with adding libraries to a sketch.

In version 1.5.2 scrolling through examples works, but like 1.0.3, it can't scroll through libraries.

This is on a Fedora 17 64-bit Linux machine using Xfce as the window manager.  The Arduino software was installed into my home directory, with separate directories for each version and the libraries copied into each version.

When I compare source files between 1.0.3 and 1.0.5 nothing stands out as the reason that the examples menu behavior has changed.  I expect the up and down arrows at the top and bottom of a menu that doesn't fit all of the items on a screen.  With version 1.0.5 this doesn't happen, and only works for examples on versions 1.0.3 and 1.5.2.  I'm pretty sure it isn't my version of Java, because it works differently for each version of the IDE.

Has anyone else experienced this?  Is there something I missed when extracting the contents of the downloaded files from the Arduino site?


I just tried it with Arduino 1.0.5 and Mac OS 10.7.5 and all three large menus scroll as expected.  I suspect the problem is in Java.

The version of the Java framework I seem to be running is 14.7.0 last modified April 22, 2013.  I don't know if that version number translates to other platforms or not.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Interested in this as I also can not see some libraries.

Does the IDE always use the Java that in installed with the Arduino package?

I use hierarchy for sketches but I think libraries can't be done that way, right??
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info


After a wee bit of delay, I finally got around to looking at the source code to find the problem of why scrolling wasn't working for the new versions of the Arduino IDE.  It seems to come down to the elimination of the MenuScroller class.  In the 1.5.2 version I have (as a binary), the scrolling was working ok for examples, but not imports.  In the version I downloaded from GIT, scrolling didn't even work for examples.  In comparing the source for the versions I found the MenuScroller class to be gone.  So I quickly added it back in and applied it in the Editor.java source file in two places, compiled and ran with ant, and now they work.

I am running on a Fedora 19 Linux box, with Java 1.7.  Given that I can add the scrolling back in to what the IDE versions before 1.0.3 were like, it looks like the issue is with that scrolling class, and not with Java.  I added MenuScroller.java back into the tools directory.  Line 629 (in the GIT code) of Editor.java now looks like:
Code: [Select]
    if (importMenu == null) {
      importMenu = new JMenu(_("Import Library..."));
      MenuScroller.setScrollerFor(importMenu);        // <<<<<< this is the only line added to get this menu selection to scroll
      base.rebuildImportMenu(importMenu, this);

The code for the Examples menu selection is similar, where it now matches what it was.

If there is supposed to be something working as a replacement for the MenuScroller class, it isn't working on my machine.  I haven't tried on other OS platforms because I don't have them.



This should probably be filed as a bug report on Arduino's github.

Go Up