Hey Johan,
It must be very late for you there! Good to see you're working on Squirrel
into the wee small hours. Thats what I call dedication <grin/>.
I've just synched with the latest version from CVS (damn firewalls) and had
a quick play with it. Works properly with Mckoi now (longvarchar works).
<snip>
If i did a refresh pressing the button then the cursor did stay wrong
i added a _cursor.restore() after i do the refresh now just to be sure.
</snip>
Peculiar, now its not showing the wait cursor for me at all. _However_ I
must say that the refresh seems to be running a lot faster now than it was
previously so it may not have time to show the cursor.
<snip>
I already did a rewrite :-)
</snip>
Excellent!!!.
<snip>
the problem with the previous approacher (TreeState object or something)
was that this only stored treepaths and then say to the tree expand
But the problem if you do a reload of the tree then that tree path isn't
there
anymore because it is not loaded yet.
I fixed that because the refresh is now really done by the model and its
nodes
and not just a call on root.reload() (look at BaseNode)
But i don't use the methods: getExpandedNodes(TreePath) or isExpanded()
anymore so maybe i should first try to get those and the do the current
refresh
and then expand those. (but not really those? because that real objects
treepath
are removed and replaced with something else.
</snip>
It is convienient to expand them. The previous behaviour was an irritation
when something externally has changed the structure of a table or added a
table, you do a refresh and then you had to expand the tree to find where
you were. I much prefer your new behaviour.
One peculiarity. When you first open a database it expands the database tab
showing all schemas/catalogs and selects the datbase node for display
(exactly what it should do) but if you then Refresh it, it expands all the
schema/catalog tabs but doesn't remember the node that was selected. In fact
refresh _always_ expands the schema/catalog tabs even if they weren't
expanded.
It would be nice if you could take the code you have written
saving/restoring the expansion state of a tree and abstract it out into a
separate class (like SavedExpansionState). A component that you could use to
save and restore the state of any JTree would be very convienient.
Nice work!
Col
|