UIPainterView.st
changeset 2505 2d43dbc0e86c
parent 2499 11be77599ca9
child 2508 d9dc378aaf8d
equal deleted inserted replaced
2504:8746b7a4d215 2505:2d43dbc0e86c
  1631                 aView subViews size == 1 ifTrue:[
  1631                 aView subViews size == 1 ifTrue:[
  1632                     vSpec := self fullSpecFor:(aView subViews first).
  1632                     vSpec := self fullSpecFor:(aView subViews first).
  1633                 ]
  1633                 ]
  1634             ].
  1634             ].
  1635             vSpec isNil ifTrue:[
  1635             vSpec isNil ifTrue:[
  1636                 self warn:'Oops - could not create spec for some view'
  1636                 (Dialog 
       
  1637                     confirm:('Oops - could not create spec for view: %1\\Continue ?' bindWith:aView printString) withCRs
       
  1638                     noLabel:'Abort')
       
  1639                 ifFalse:[
       
  1640                     AbortSignal raise
       
  1641                 ].
  1637             ].
  1642             ].
  1638             spec add:vSpec
  1643             spec add:vSpec
  1639         ].
  1644         ].
  1640 
  1645 
  1641     self subViews do:addToSpec.
  1646     self subViews do:addToSpec.
  2433     "generate a full spec for an object
  2438     "generate a full spec for an object
  2434     "
  2439     "
  2435     |mySpec subSpecs|
  2440     |mySpec subSpecs|
  2436 
  2441 
  2437     mySpec := self specFor:aView.
  2442     mySpec := self specFor:aView.
  2438 
       
  2439     (mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[
  2443     (mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[
  2440         (aView subViews notNil) ifTrue:[
  2444         subSpecs isNil ifTrue:[
  2441             aView components notEmptyOrNil ifTrue:[ self halt ].
  2445             subSpecs := OrderedCollection new
  2442             aView subViews do:[:aSubView||spec|
  2446         ].
  2443                 spec := self fullSpecFor:aSubView.
  2447 
  2444                 spec notNil ifTrue:[
  2448         ((aView components ? #()) , (aView subViews ? #())) do:[:aSubViewOrComponent |
  2445                     subSpecs isNil ifTrue:[
  2449             |spec|
  2446                         subSpecs := OrderedCollection new
  2450 
  2447                     ].
  2451             spec := self fullSpecFor:aSubViewOrComponent.
  2448                     subSpecs add:spec.
  2452             spec notNil ifTrue:[
  2449                 ].
  2453                 subSpecs add:spec.
  2450             ].
  2454             ].
  2451             subSpecs notNil ifTrue:[
  2455         ].
  2452                 mySpec component:(SpecCollection new collection:subSpecs)
  2456 
  2453             ]
  2457         subSpecs notEmptyOrNil ifTrue:[
       
  2458             mySpec component:(SpecCollection new collection:subSpecs)
  2454         ]
  2459         ]
  2455     ].
  2460     ].
  2456     ^ mySpec
  2461     ^ mySpec
  2457 !
  2462 !
  2458 
  2463