equal
deleted
inserted
replaced
842 |
842 |
843 setupFromSpec:specOrSpecArray |
843 setupFromSpec:specOrSpecArray |
844 |spec builder| |
844 |spec builder| |
845 |
845 |
846 self removeAll. |
846 self removeAll. |
|
847 |
847 spec := UISpecification from:specOrSpecArray. |
848 spec := UISpecification from:specOrSpecArray. |
848 builder := UIBuilder new. |
849 builder := UIBuilder new. |
849 spec window setupView:self topView for:builder. |
850 spec window setupView:self topView for:builder. |
850 self addSpec:(spec component) builder:builder in:self. |
851 self addSpec:(spec component) builder:builder in:self. |
851 self realizeAllSubViews. |
852 self realizeAllSubViews. |
1560 ! |
1561 ! |
1561 |
1562 |
1562 undoSpecModify:aViewId |
1563 undoSpecModify:aViewId |
1563 "undo method when changing the specification for an object |
1564 "undo method when changing the specification for an object |
1564 " |
1565 " |
1565 |builder view spec v| |
1566 |builder view spec v props| |
1566 |
1567 |
1567 (view := self findViewWithId:aViewId) notNil ifTrue:[ |
1568 (view := self findViewWithId:aViewId) notNil ifTrue:[ |
1568 spec := self specFor:view. |
1569 spec := self specFor:view. |
1569 view := nil. |
1570 view := nil. |
1570 |
1571 |
1571 undoHistory addUndoBlock:[ |
1572 undoHistory addUndoBlock:[ |
1572 (view := self findViewWithId:aViewId) notNil ifTrue:[ |
1573 props := self propertyOfIdentifier:aViewId. |
|
1574 props notNil ifTrue:[ |
|
1575 view := props view. |
1573 builder := UIBuilder new. |
1576 builder := UIBuilder new. |
|
1577 props spec:spec. |
|
1578 |
1574 spec needsRebuildForAttributes ifTrue:[ |
1579 spec needsRebuildForAttributes ifTrue:[ |
1575 v := spec buildViewWithLayoutFor:builder in:view superView. |
1580 v := spec buildViewWithLayoutFor:builder in:view superView. |
1576 v realize. |
1581 v realize. |
1577 view destroy. |
1582 view destroy. |
1578 view become:v. |
1583 view become:v |
1579 ] ifFalse:[ |
1584 ] ifFalse:[ |
1580 spec setAttributesIn:view with:builder. |
1585 spec setAttributesIn:view with:builder. |
1581 self elementChangedSize:view. |
1586 self elementChangedSize:view. |
1582 ]. |
1587 ]. |
1583 ] |
1588 ] |