Hi,

I would like to create a code browser, where the top pane is a finder which adds a new pane when some clicks on a class name. The following code works fine except with interactions like:

1- select a class
2- select a selector of this class
3- select a class in the newly added pane

This tries to display the source code of the class selected in step 3 for the selector of step 2 (which is wrong because selector of step 2 is only defined in the class of step 1).

Can somebody help me please? The code is:

|extTabulator finder intTabulator|

intTabulator := GLMTabulator new column: #classes; column: #selectors; yourself.

intTabulator transmit to: #classes; andShow: [:a | a list title: 'classes'; display: [:class | class allSuperclasses]].
intTabulator transmit from: #classes; to: #selectors; andShow: [:a | a list title: 'selectors'; display: [:class | class selectors]].

finder := GLMFinder new.
finder custom: intTabulator.

"Makes the finder add an new pane when selecting a class"
intTabulator transmit from: #classes; toOutsidePort: #selection.

extTabulator := GLMTabulator new row: #finder; row: #source; yourself.
extTabulator transmit to: #finder; andShow: [:a | a custom: finder].

"Makes the internet tabulator exports the currently selected selector"
intTabulator transmit from: #selectors; toOutsidePort: #selector.

extTabulator transmit
from: #finder;
from: #finder port: #selector;
to: #source;
andShow: [:a | a text
display: [:class :selector | class name, '>>', selector, String cr,
((class includesSelector: selector)
ifTrue: ['ok']
ifFalse: ['ERROR: class does not have this selector!'])]].

extTabulator openOn: IdentitySet.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them popular by not having them." James Iry