Please try something like: browser sendToOutside: #selCheight from: #cheight->#selection.
but normally your version should work
On 15 déc. 2009, at 15:36, Johan Fabry wrote:
Hi Doru,
below is the code, thanks!
propertiesSelector2 | browser mprops cprops aprops |
cprops := {'Classes LOC'. 'Num Methods'. 'Num Attributes' . 'Num JoinPoints' . 'Num Aspects'}. aprops := {'Aspects LOC' . 'Num Pointcuts' . 'Num Advice' . 'Num JoinPoints'}. mprops := {'Methods LOC' . 'Num JoinPoints' . 'Num Aspects'}. browser := GLMTabulator new. browser column: [: c | c row: #cheight; row: #aheight; row: #mheight]; column: [: c | c row: #cwidth; row: #awidth; row: #mwidth]. browser showOn: #cheight; using: [ browser tree title: 'Classes Height'; display: cprops.]. browser showOn: #cwidth; using: [ browser tree title: 'Classes Width'; display: cprops]. browser showOn: #aheight; using: [ browser tree title: 'Aspects Height'; display: aprops.]. browser showOn: #awidth; using: [ browser tree title: 'Aspects Width'; display: aprops.]. browser showOn: #mheight; using: [ browser tree title: 'Methods Height'; display: mprops.]. browser showOn: #mwidth; using: [ browser tree title: 'Methods Width'; display: mprops.]. browser sendToOutside: #selCheight from: #cheight. browser sendToOutside: #selCwidth from: #cwidth. browser sendToOutside: #selAheight from: #aheight. browser sendToOutside: #selAwidth from: #awidth. browser sendToOutside: #selMheight from: #mheight. browser sendToOutside: #selMwidth from: #mwidth.
^ browser
On 15 Dec 2009, at 07:26, Tudor Girba wrote:
Hi Johan,
It looks like you did not export properly the ports from the inner browser (propertiesSelector2). Could you paste that here?
Cheers, Doru
On 15 Dec 2009, at 02:02, Johan Fabry wrote:
On 14 Dec 2009, at 18:52, Simon Denier wrote:
OK we are almost there ... one last hitch (see test code below). if I dont add allowNil the text browser only shows text if all 6 lists have a selection. I want to be able to have a list without selection (= no metric), so I added allowNil, but that always shows the text nilnilnilnilnilnil . How do I fix this? Thanks in advance!
| browser |
browser := GLMTabulator new. browser row: #selections; row: #selectionStatus. browser showOn: #selections; using: [browser custom: AMUI new propertiesSelector2 ].
browser showOn: #selectionStatus; from: #selections->#selCwidth; from: #selections->#selCheight; from: #selections->#selAwidth; from: #selections->#selAheight; from: #selections->#selMwidth; from: #selections->#selMheight; using: [browser text display: [ :cw :ch :aw :ah :mw :mh | ch asString, cw asString , ah asString, aw asString, mh asString, mw asString]; allowNil ].
Usually one inserts a when: clause to activate the pane when a specific parameter is not nil (because at least one should be not nil to display something). But in your case it seems different: the status is always active, but it should filter the nil in its display: block
Something like (warning, not tested!)
using: [browser text display: [ :cw :ch :aw :ah :mw :mh | {cw. ch. aw. ah. mw. mh} select: #notNil thenCollect: #asString ]; allowNil ].
Thanks for helping out, but the problem remains the same: the parameters passed to the block are *always* nil when I allowNil, and when I dont allowNil the browser only displays the parameters when all 6 lists have a selection. a when: does not help here (in either of both cases).
Anybody got any other ideas?
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Next time you see your life passing by, say 'hi' and get to know her."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Simon