Re: Trees in Tabs?
reverendlinux <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
On Nov 2, 10:02 pm, "alta88[nntp]" <[email protected]> wrote: > ---On 2011.Nov.02 5:59 PM, reverendlinux wrote: > > > > > > > > > > > On Nov 1, 10:54 pm, "alta88[nntp]"<[email protected]> wrote: > >> ---On 2011.Nov.01 7:51 PM, reverendlinux wrote: > > >>> On Oct 31, 11:10 am, Lukas_Skywalker<[email protected]> wrote: > >>>> I had a different approach. For an example, look here:http://musicdc.svn.sourceforge.net/viewvc/musicdc/trunk/chrome/conten... > > >>>> In line 923, i get a reference to the _treechildren_ element of the tree. This is important, use treechildren. > >>>> I'm creating treeitem, treerow and treecell elements on the next lines and append them in reverse order to each other. This works for me. > > >>> Lukas, > > >>> Thanks for the suggestion. I took a look at your code (nice), but I'm > >>> afraid I have already tried the approach you suggested. In an earlier > >>> version of my app I used something very similar but without tabs. > >>> However, when I tested the code on large amounts of data I noticed a > >>> huge performance drop. That is why I am using the method I am now and > >>> it is the method I wish to remain using. > > >>> However, as a test I rewrote that section of my code to use your > >>> method. Although it processed the data properly, nothing was > >>> displayed. > > >>> So either way, I am back to stumped... > > >> take a look at TotalMessage (for Tb), at customizeToolbar.xul and > >> customizeToolbarOverlay.js. it adds an xul tab to the customize dialog, > >> with a tree using a view. > > >> or it could be something like you don't have a primary attribute on any > >> column. > > >>http://totalmessage.mozdev.org/ > > > Thanks for the reply. > > > For the primary attribute, the way I understand it is that it is used > > for nested trees. I'm using a standard column/row type tree so the > > primary attribute would not have any effect. But I did add it in > > and...no change. > > > As for the TotalMessage plugin, that's going to take me some time to > > work through. I'm not a guru on Javascript so a large part of that > > code is a bit on the complex side for my knowledge level. I'm going > > to try to dissect it and see what may correspond to what I am doing > > (and whether I can make any sense of it). However, any tutoring would > > be appreciated. > > > Again, thanks for taking the time to reply. > > you're correct re primary attribute. > > well, it is indeed complex. but you only need to look at the code at > the bottom where the nsITreeView implementation starts, the onLoad(), > and how the xul overlay is structured. > > the getCellText returns data from visibleArray for collapsed rows, > that's it basically, the rest isn't material to your implementation. > > you should probably just start with one tree in one tab, rather than > going for multiple tabs, until it works. and add some logging so you > know what tree id is having a view set, if getCellText is getting called > etc. It's been a few weeks, but I had time this past weekend to revisit this issue. And I must swallow my pride and say it's got me beat. Using the code from totalmessage as a base, I worked long and hard trying to get just one tab working and failed miserably. As before, I get no errors in the -jsconcole and using try/catch doesn't return any errors. The tree in the tab just never appears. So this one is going on the shelf for the forseeable future. Thanks to all that gave input into this. If I ever get it working, I'll post the working code here. Cheers!