I am working on an application that involves access of users to grid jobs.

I am using Pyjs to present a tree--right now this tree has 4 entities (up
from three in an old CherryPy app) of which two are more or less pure
containers, one is the user (always the root) and the final entity is the
workflow (a parameterized script calling various binaries for research
purposes).  The customers wanted the structure shown as a tree.

This is easy enough if they are going to stick to 4 levels.  A user has
projects which have analysis runs, which contain workflows.  But the reason
I am asked to redo this from the old cherryPy is that Projects of workflows
had become unwieldy in the extreme as people were scrolling through
hundreds of projects.

So, I set up a page with a tree which could be up to 10 layers deep
depending on what is received onModuleLoad().

Each layer can have several buttons which refer to self and more which
refer to the layer below.

When I make the number of buttons static, I can make the right ones appear
and disappear and I have an onXxyyzzClicked() function set up specifically
for each button.  In thos circumstances, I can get the onTreeItemSelected()
to make the right number of buttons appear and even be appropriate to what
is selected.   But when I go dynamic and use the onClick() with an
iteration to fin the right button in Buttons...  Well the
onTreeItemSelected can't find the right buttons to make visible.    I gt
the message "(Void 0) is not a function".  I have tried several different
refactoings, but run into the same problem.

If anyone knows how to automagically make one function in a Tree class
instantiation recognize objects from anothe class (buttons), maybe I can
avoid giving some Java programmers a conniption by not using Python to put
together a source file on the basis of number of layers or node levels in a
tree and then exec'ing it before handing it over to pyjsbuild.

Michael Moore

-- 



Reply via email to