Hi, On Mon, Aug 7, 2017 at 5:28 AM, Evan Donahue <emdon...@gmail.com> wrote:
> Hello, > > I have a gtInspector extension a tree-structured object. By default, when > I click on one of the objects in the gtInspector, the inspector opens up > another inspector on that node (using the finder-style display). > > What I would like to know is, is it possible to override the default click > behavior so that, instead of opening the next inspector on that node of the > tree, it opens on the result of a block run on that tree. Specifically, I > have this: > > gtInspectorSource: composite > <ignoreForCoverage> > <gtInspectorPresentationOrder: 10> > composite tree > title: 'Source'; > children: [ :r | r sourceChildren ]; > format: [ :r | r sourceName ]; > display: self > > and I was hoping there was some way I could do something like this: > > ... > display: self; > onSelectAction: [ :r | r next ] > > so when I click, I get an inspector not on the node of the tree r, but on > r next. > You can get this behaviour by using #send:. This method gets a block that is executed to determine the value that will be sent to the next column. composite tree title: 'Source'; children: [ :r | r sourceChildren ]; format: [ :r | r sourceName ]; display: self send: [ :r | r next ] Cheers, Andrei > > Thanks, > > Evan >