Hi,
I am not sure I like the whole setup of the browser :). Anyway, you would want to reset
the #selector port every time you select a class. Add this:
intTabulator transmit from: #classes; toOutsidePort: #selector; transformed: [nil].
It is hackish, but this is because you want to reason outside of the intTabulator browser
about something that is internal.
Cheers,
Doru
On 21 Jul 2011, at 08:03, Damien Cassou wrote:
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
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"There are no old things, there are only old ways of looking at them."