Viewbuilder question: Is it possible to return (print) the entire tree of the view from a window tool?

Does anyone know if there is any way to somehow print or return in text format the entire tree of a window tool’s view?

This could be useful if we break the general tree into small functions to load them later in the general tree.

A simple example. Imagine you have a tool with a general tree like this:

vb:row {
   vb:button {
     text="My Button 1"
   vb:button {
     text="My Button 2"

How to print or get this to extract to a text file for example. That is, get the entire tree to be able to examine it, with all the properties of each object and all that.

Any ideas?

1 Like

print vb.view
print Renoise.Views

does that even work

I do not know how to iterate the vb.view or Renoise.views

for x in pairs(vb.view)

will work, but then
each x object may have a different number of parameters to print.

Yes, work!

This is the issue. For programmers it would be very useful to have a function that would return the entire tree of the view in the current state. I have not had time to investigate this in depth, but it would allow more control to keep the views as simple as possible within the complexity of it.