Tuesday, September 07, 2010
Search   GO
|

 
 
 
archive
blog
Nov 2

Written by: Steve
02 November 2009

Time for the big one. This build ties up the last of the loose ends and fixes the one outstanding bug that i was aware of. I've spent some time assessing the commands that I've written during the development of the control and decided that they need some rework. The result? Some fabulous new commands!

In all seriousness, unless someone points out some real clanger of a bug, this version should be the one that's launched. Just some improvements to the documentation to do (mainly reformatting the Events section, so it's in line with the new Commands section).

As previously mentioned in an earlier blog post, you no longer need to create or log into an account. The beta download is freely available for all from the downloads page.

Data Tree is designed to run on both Mac and Windows, adopting the correct appearance at runtime.


Fixed bug: Suspended scrollbars
Under some circumstances, the pesky IDE was preventing a suspended tree coming back to life when the window was resumed. This took me the best part of a Saturday afternoon to solve!

Turns out that when the "Do you want to save?" sheet pops up, the stack being saved misses out on a resumeStack message. Hilarious. 


New command: dt_createNode
The number of parameters that applied to dt_addNode and dt_addNodeToNode were too many and should new properties be added to nodes by the library in the future, this command will simply become insane to use.

Taking dt_addNodeToNode as the inspiration, you can now use dt_createNode to create a new node anywhere in the tree, even at the root level and thus avoiding having to do anything with the dt_setRootNodes command.

The new command still has parameters for the most basic of node properties, being label and icon but everything else is put into a return delimited list, which is then parsed by the command. If you do not include a property within the list, a default will still apply.

The older commands dt_addNode and dt_addNodeToNode have been removed from this build, so if you've been building an actual application with the beta library, you'll need to update your code.


New command: dt_duplicateNode
Does what it says on the tin.

What's quite clever is that you can create an invisible node with various properties already defined. You can then duplicate this node and rename it, rather than construct a list of properties to be applied with the dt_createNode command.

All new commands have the ability to set the expand setting of a parent node during new node creation, which is handy as you then do not have to manipulate the parent node afterwards. 


New command: dt_deleteNode
Again, this should be pretty straightforward. If you delete a node that is owned by another, this reference will also be deleted.

If you delete a node that owns other nodes, these nodes will not be deleted. To entirely remove part of the tree from the node data, you must manually delete each node. 


New function: dt_nodeExists
Use this function to determine whether a node id exists in the tree. 


Change to command: dt_editNodeProperty is now dt_setNodeProperty
I've renamed the dt_editNodeProperty command to dt_setNodeProperty, mainly because I kept on typing dt_setNodeProperty when coding. It fells more natural in the RunRev scheme of things.

Also, in keeping with the order of the declared parameters of other commands, the parameter that suppresses the redraw when a property is changed has been moved. 


Fixed odd behaviour: Scrollbar
If you scrolled the tree group and then it redrew for whatever reason, sometimes it would jump back to an earlier scroll position. Now when you interact with the tree by using the scrollbar itself, it will store the scroll position.


Finished feature: Highlight hues
Have added red, green and orange highlight hues for all platforms. Same again added in gradient form for the Mac OS X appearance. 


Added: Nag window
As per a recent blog post of mine, I'm going to need this when the final product is released, so I've built it into this beta. 


Documentation: New Step by Step Guide
This section has been completely rewritten to match the new commands. Funnily enough, it's even easier to create trees now than before (no setting root nodes separately anymore!). 


Documentation: Commands reviewed and updated
This section has been completely rewritten. Just the Events section to tart up now. 


Fixed bug: disclosure triangles failing to highlight when several levels deep
Fixed bug: WIndows XP and Vista 'text' highlight routines redrawing in the wrong place when several levels deep
Ooh, these were fun bugs to track down. Turns out that the technique I was using to calculate a co-ordinate was a little bit flawed!


And many, many other tweaks and improvements.

Tags:

Your name:
Title:
Comment:
Add Comment    Cancel  
  
Powered by WebRing.
 
Copyright ©2008-2009 theworcestersource.com | Terms of Use | Privacy Statement