Re: making tree with custom tree view dynamicaly (c++)

reverendlinux <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
On Dec 10, 7:37 am, Neil <[email protected]> wrote:
> reverendlinux wrote:
> >You have broken a months long log jam.
>
> I still have a note from last *year* to remind me to look into your
> problem ;-)
>
> --
> Warning: May contain traces of nuts.

Neil,

First, thanks for keeping me on your to-do list.  The assistance of
yourself and others has been most appreciated since I started working
with XUL.

Second, I'm not to proud to admit that I'm no expert in the ways of
XUL, Javascript and XPCOM.  So if my answer to your question is a bit
convoluted, please understand where I am coming from.

My problem was two fold.  There was one silly mistake where missed a
comma in the getCellText portion of the function.  Surprisingly, this
didn't throw an error.  I only found this, as stated in my last post,
by going through the code line by line comparing mine to YuLo's.
However, the biggest roadblock was in my understanding of how the
custom tree view works.  Through trial and error I figured out that I
seemed to have been calling the view too soon in the execution of my
script (the line document.getElementById(alphaList).view = treeView;
in my original test code).  If I put all of my script into one
function then called it from my XUL window, nothing appeared and no
error was thrown.  When I split the var treeView piece into one
function (called from the XUL window) and the .view piece into a
separate function (called from the treeView function or the XUL
window) it worked well.  After correcting the aforementioned comma
oops of course.

As for the custom tree view documentation, well, for me it was only
somewhat helpful; 3 out of 5 starts.  Again, this is coming from
someone who is learning as he goes so my opinion is decidedly skewed.
My trial and error coupled with referring back to the documentation
did clue me in, but the docs were rather high level for me.  What
would be most helpful to me and others learning the XUL/XPCOM/
Javascript ropes would be a line by line discussion of how the custom
tree view code works.  For example, what exactly does isSorted:
function(row){return false;}, do and what happens when you do things
like change false to true.

Again, thanks for the help you've given in the past and for taking the
time get this feedback.

Regards...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.