Pages: « 1 2 3
  Print  
Author Topic: Can't rename a resource under linux KDE  (Read 6125 times)
Offline (Unknown gender) egofree
Reply #30 Posted on: June 10, 2014, 12:57:18 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
You could also try changing uhm setFocusTraversalPolicy of the toolbar.

Interesting. Within LateralGm, in the main method i've added the following code after the creation of the JFrame (line 843) :

Code: [Select]
final Container contentPane = LGM.frame.getContentPane();
Comparator<Component> comp = new Comparator<Component>() {
  public int compare(Component c1, Component c2) {
    Component comps[] = contentPane.getComponents();
    List<Component> list = Arrays.asList(comps);
    int first = list.indexOf(c1);
    int second = list.indexOf(c2);
    return second - first;
  }
};

FocusTraversalPolicy policy = new SortingFocusTraversalPolicy(comp);
frame.setFocusTraversalPolicy(policy);

I've found the code here : http://www.java2s.com/Code/JavaAPI/java.awt/ContainersetFocusTraversalPolicyFocusTraversalPolicypolicy.htm

I don't have anymore the error, and the focus traversal policy seems to work. However on the toolbar it doesn't seem to work anymore, but from my points of view it's not important. But is it the best way to fix this error ? I don't know. (At least the useLegacyMergeSort was only one line of code).


« Last Edit: June 10, 2014, 01:00:25 PM by egofree » Logged
Offline (Male) Goombert
Reply #31 Posted on: June 27, 2014, 04:25:46 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
I am still thinking about this one, but I think I would prefer to go with the verbose version purely because using legacy merge sort will not be an option in later Java releases.

egofree, could you also try upgrading to Java 8 or downgrading to 6? Or both?
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #32 Posted on: June 27, 2014, 11:26:40 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
I am still thinking about this one, but I think I would prefer to go with the verbose version purely because using legacy merge sort will not be an option in later Java releases.

egofree, could you also try upgrading to Java 8 or downgrading to 6? Or both?

Thanks for not forgetting this problem. But i am already using Java 8 !
Logged
Offline (Unknown gender) egofree
Reply #33 Posted on: July 03, 2014, 02:19:12 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
Another solution would be to load in LateralGm the debug/run/compile buttons disabled by default. If the plugin is loaded, they would be enabled. Of course this solution would be less generic, but i guess it would fix the problem.
« Last Edit: July 03, 2014, 02:21:28 AM by egofree » Logged
Offline (Male) Goombert
Reply #34 Posted on: July 03, 2014, 03:36:03 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
That won't work ego, the whole point of the plugin is that LGM is its own program, it is separate from our project and can operate while being entirely isolated from a compiler.

But that is close to another solution, I am wondering if we added a callback in LGM for adding buttons to that toolbar if it wouldn't error.

Also I've filed a formal ticket for this.
https://github.com/IsmAvatar/LateralGM/issues/124
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) egofree
Reply #35 Posted on: July 25, 2014, 03:02:00 PM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
If you change in preferences the icons to Swing, the bug is gone !  :o  Don't ask me why !   ;D
« Last Edit: July 25, 2014, 03:03:46 PM by egofree » Logged
Offline (Male) Goombert
Reply #36 Posted on: July 25, 2014, 08:24:55 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3107

View Profile
Probably because Swing doesn't have a run icon and therefore it may not even be adding the button to the toolbar?
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: « 1 2 3
  Print