# HG changeset patch # User ca # Date 950778813 -3600 # Node ID 189c9cec8ce6e276b5a6df07af3e5e68a18348eb # Parent ef6320ea43bc7db2141672a2c5ecd776d7a357f4 exported channels. diff -r ef6320ea43bc -r 189c9cec8ce6 UIPainter.st --- a/UIPainter.st Wed Feb 16 13:40:28 2000 +0100 +++ b/UIPainter.st Thu Feb 17 10:13:33 2000 +0100 @@ -3658,15 +3658,44 @@ canvasSpec "returns spec assigned to canvas" - |spec| + |spec list key block exported cls canvas| spec := WindowSpec new. - - spec fromView:(self canvas topView) callBack:nil. + canvas := self canvas. + + spec fromView:(canvas topView) callBack:nil. + windowSpec notNil ifTrue:[ - spec copyValuesFromSpec:windowSpec + spec copyValuesFromSpec:windowSpec. ]. - ^ spec + + spec exportedAspects isNil ifTrue:[ + exported := IdentitySet new. + + ( (cls := canvas className) notNil + and:[(cls := canvas resolveName:cls) notNil + and:[(list := cls perform:#aspectSelectors ifNotUnderstood:nil) notNil]] + ) ifTrue:[ + list do:[:el| exported add:el] + ]. + spec exportedAspects:exported. + + windowSpec notNil ifTrue:[ + windowSpec exportedAspects:(exported copy) + ]. + ]. + + list := OrderedCollection new. + block := [:k| + (k isSymbol and:[(list includesIdentical:k) not]) ifTrue:[list add:k] + ]. + + self propertiesDo:[:aProp| + block value:(aProp model). + aProp spec aspectSelectors do:block. + ]. + spec listOfExportedAspects:list. + ^ spec !