Hi Chris,
> Bei mir funktioniert Deine Variante also nicht und statt dessen die
> Variante, die vorher aktiv war:
> Was nun?
I have removed the last file revision from CVS and got back to the
previous revision, which still has the problem reported to you earlier:
1. Start FreeMind with some map opened
2. Click "File" -> "New" => new map is created in the second tab
3. Change back to the already opened map by clicking the first tab
4. "File" -> "Close"
=> Exception is thrown:
java.lang.NullPointerException
at
freemind.controller.MapModuleManager.changeToMapModule(MapModuleManager.java:216)
at freemind.main.FreeMind$2.stateChanged(FreeMind.java:329)
at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:287)
at
javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:219)
at
javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:116)
at
javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:50)
at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:468)
at javax.swing.JTabbedPane.removeTabAt(JTabbedPane.java:784)
at freemind.main.FreeMind$3.afterMapClose(FreeMind.java:389)
at
freemind.controller.MapModuleManager$MapModuleChangeObserverCompound.afterMapClose(MapModuleManager.java:107)
at
freemind.controller.MapModuleManager.close(MapModuleManager.java:291)
at freemind.controller.Controller.close(Controller.java:647)
...
The problem arises from the fact that Method fireStateChanged is called
before the internal vector pages is changed(jdk 1.4.2_13) . So the
called listener method stateChanged becomes wrong selected Title by calling
String selectedTitle = mTabbedPane.getTitleAt(selectedIndex);
The returned title still exists in mTabbedPane, but have already been
removed from the map module manager which creates the above exception.
So we still need a solution.
What is your opinion: who of us should care about this peace of code? It
would be great if you could get it working. If you can not reproduce the
problem, how could I help you?
Cheers, Dimitry
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freemind-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemind-developer