Message |
At 12:16 PM 8/15/00, you wrote: >This message has been sent to 8 subscribers to the Trees for Melati Messageboard (http://www.paneris.org/webmacro/MessageBoard?db=paneris&messageboard=275) > >Myles, > >Sorry I missed replying earlier. I tried the version when you first >announced it while you were on holiday. I liked it a lot. It seemed to work >fine for me so please continue. > > > I couldn't see anything either a few minutes ago. It seems that > > someone had > > set up a circular graph - the node which should have been the root had its > > parent set (to one of its descendants). I've changed this now, so > > could you > > please check again. > > > > David, what should we do about this? The tree code doesn't do anything to > > check that we really do have a tree... > >H'mm I assume that this would be checked as part of the business logic at >the business side rather than >in the JavaScript on the client. That's what I was thinking. Note that the reason why the tree didn't display is not because it was cyclic per se, but because there were no root nodes (nodes without a parent). This is determined by the testtree project so in other cases where we know which the root nodes are we shouldn't have this problem. >Eg if I change the parent of an item then >there will most likely be a number of checks to be made (and updates to be >processed). Probably a simple idea would be a check in Melati that we can >call. eg isTreeRecursive We can do this. My feeling is that any rules about what we can and can't do when we add nodes/alter the parents of nodes must be put into the business logic on a case-by-case basis. >There are some few cases where a recursive tree works from a business sense >eg If you follow family relationships in a people system > >+ david > + children > + andrew > + parents > + david > + jane Again this is a cyclic tree, but that is allowed in this case - we just need to know that "david" is the root node. >Obviously for this to work we would have to support only loading one layer >at a time. So it's not for now (just a bit of a digression on my part). Loading N levels at a time is already supported - we just need to change the '-1' (meaning "no limit on the tree depth") in the javascript and handler to N. > > Could you have a look and let me know what you think so far > >It's good. Continue. OK. I'm not sure what _is_ next, though :-) I'll have a look. >Erik is back from holiday now and is working on a web application that will >be using JTemplater and probably Melati. > >I am now on holiday (email thanks to new pcard for mobile phone). > > > BTW, so far I have used about half the budget... > >OK. > >Regards > >Dave Myles
|