2434 copyOfSpec class supportsSubComponents ifTrue:[ |
2434 copyOfSpec class supportsSubComponents ifTrue:[ |
2435 copyOfSpec component:nil |
2435 copyOfSpec component:nil |
2436 ]. |
2436 ]. |
2437 |
2437 |
2438 nameOfSpec := copyOfSpec name. |
2438 nameOfSpec := copyOfSpec name. |
2439 |
2439 "/ old: enforce a name |
2440 (nameOfSpec isNil or:[(self propertyOfName:nameOfSpec) notNil]) ifTrue:[ |
2440 "/ (nameOfSpec isNil or:[(self propertyOfName:nameOfSpec) notNil]) ifTrue:[ |
2441 copyOfSpec name:(nameOfSpec := self uniqueNameFor:copyOfSpec) |
2441 "/ copyOfSpec name:(nameOfSpec := self uniqueNameFor:copyOfSpec) |
|
2442 "/ ]. |
|
2443 "/ aView name:nameOfSpec. |
|
2444 "/ new: |
|
2445 (nameOfSpec isNil "notEmptyOrNil" or:[ (self propertyOfName:nameOfSpec) notNil]) ifTrue:[ |
|
2446 copyOfSpec name:(nameOfSpec := self uniqueNameFor:copyOfSpec). |
|
2447 aView name:nameOfSpec. |
2442 ]. |
2448 ]. |
2443 aView name:nameOfSpec. |
2449 "/ end |
|
2450 |
2444 treeView addProperty:newProperty beforeIndex:beforeIndex. |
2451 treeView addProperty:newProperty beforeIndex:beforeIndex. |
2445 ]. |
2452 ]. |
2446 |
2453 |
2447 newView := aSpecification buildViewWithLayoutFor:aBuilder in:aFrame. |
2454 newView := aSpecification buildViewWithLayoutFor:aBuilder in:aFrame. |
2448 |
2455 |
2596 ]. |
2603 ]. |
2597 |
2604 |
2598 self singleSelection notNil ifTrue:[ |
2605 self singleSelection notNil ifTrue:[ |
2599 self withSelectionHiddenDo:[ |
2606 self withSelectionHiddenDo:[ |
2600 self transaction:#specification selectionDo:[:aView| |
2607 self transaction:#specification selectionDo:[:aView| |
|
2608 |
2601 props := self propertyOfView:aView. |
2609 props := self propertyOfView:aView. |
2602 name := (aSpec name) withoutSeparators. |
2610 name := (aSpec name) withoutSeparators. |
2603 |
2611 |
2604 (name = props name) ifFalse:[ |
2612 name isNil ifTrue:[ |
2605 (self propertyOfName:name) notNil ifTrue:[ |
2613 "/ not yet given a name |
2606 name := props name |
2614 (name ~= props name) ifTrue:[ |
2607 ] |
2615 (self propertyOfName:name) notNil ifTrue:[ |
|
2616 name := props name |
|
2617 ] |
|
2618 ]. |
2608 ]. |
2619 ]. |
2609 |
|
2610 aSpec name:name. |
2620 aSpec name:name. |
2611 self createUndoSpecModify:props. |
2621 self createUndoSpecModify:props. |
2612 self rebuildView:aView fromSpec:aSpec withBuilder:nil. |
2622 self rebuildView:aView fromSpec:aSpec withBuilder:nil. |
2613 props spec:(aSpec copy). |
2623 props spec:(aSpec copy). |
2614 treeView propertyChanged:props. |
2624 treeView propertyChanged:props. |
2615 ] |
2625 ] |
2616 ] |
2626 ] |
2617 ] |
2627 ] |
2618 |
2628 |
2619 "Modified: / 30.10.2001 / 13:59:45 / cg" |
2629 "Modified: / 17-08-2011 / 13:56:38 / cg" |
|
2630 "Modified (format): / 18-08-2011 / 02:19:01 / cg" |
2620 ! ! |
2631 ! ! |
2621 |
2632 |
2622 !UIPainterView methodsFor:'testing'! |
2633 !UIPainterView methodsFor:'testing'! |
2623 |
2634 |
2624 canChangeLayoutOfView:aView |
2635 canChangeLayoutOfView:aView |