Hello everyone,

First of all thanks to Tudor Girba for letting me know about the mailing list J

 

I am new to Glamour.
I was checking the examples and checking the code for the tree with expansion code. I am trying to add tabs. The only problem is that the tabs don’t have a similar function and I don’t want the transmit part to work for both.
To make things clearer I have want to show a DOM Tree in one column and when the tree is navigated attributes are shown on the second column. I want to have another tab that will just show the list of tokens that have been created during the parsing process. Because they are different, when you click on a token an error will be displayed because it does not understand the message being called.

Here is the code I have:

 

browseTree: htmlString

|browser domTree |

domTree := TreeConstruction new parse: htmlString.

                browser := GLMTabulator new.

                browser column: #one; column: #two.

                browser transmit to: #one; andShow: [:a |

                                a tree

                                                title: 'DOM Tree Browser';

                                                display: [ domTree htmlDocument  nodes first ];

                                                children: [:element :i | element  nodes];

                                                format: [:node|  node name].

                                a tree

                                title: 'Tokens List';

                                display:[domTree tokens]."Tokens get displayed here "                                                                             

                                                ].

                browser transmit to: #two; from: #one; andShow: [ :a | a text display: [:x | 'Attribute List ', x printAttributes  ] ].

                browser openOn: domTree  .

How can I achieve that? Or that is not possible?