equal
deleted
inserted
replaced
243 self setSelection:nil withRedraw:true. |
243 self setSelection:nil withRedraw:true. |
244 |
244 |
245 newSel := OrderedCollection new. |
245 newSel := OrderedCollection new. |
246 builder := UIBuilder new. |
246 builder := UIBuilder new. |
247 className notNil ifTrue:[ |
247 className notNil ifTrue:[ |
248 builder applicationClass:(Smalltalk classNamed:className). |
248 builder applicationClass:(self resolveName:className) |
249 ]. |
249 ]. |
250 |
250 |
251 keepLayout ifFalse:[ |
251 keepLayout ifFalse:[ |
252 pasteOffset := 0@0. |
252 pasteOffset := 0@0. |
253 |
253 |
460 |
460 |
461 className isNil ifTrue:[ |
461 className isNil ifTrue:[ |
462 self warn:'set the class first'. |
462 self warn:'set the class first'. |
463 ^ code |
463 ^ code |
464 ]. |
464 ]. |
465 cls := Smalltalk classNamed:className. |
465 cls := self resolveName:className. |
466 |
466 |
467 treeView propertiesDo:[:aProp| |
467 treeView propertiesDo:[:aProp| |
468 protoSpec := aProp spec. |
468 protoSpec := aProp spec. |
469 |
469 |
470 (modelSelector := aProp model) notNil ifTrue:[ |
470 (modelSelector := aProp model) notNil ifTrue:[ |
596 UISpecification prettyPrintSpecArray:spec on:str indent:5. |
596 UISpecification prettyPrintSpecArray:spec on:str indent:5. |
597 |
597 |
598 "/ if that method already exists, do not overwrite the category |
598 "/ if that method already exists, do not overwrite the category |
599 |
599 |
600 category := 'interface specs'. |
600 category := 'interface specs'. |
601 (cls := Smalltalk classNamed:className) notNil ifTrue:[ |
601 cls := self resolveName:className. |
|
602 |
|
603 cls notNil ifTrue:[ |
602 (mthd := cls class compiledMethodAt:methodName asSymbol) notNil ifTrue:[ |
604 (mthd := cls class compiledMethodAt:methodName asSymbol) notNil ifTrue:[ |
603 category := mthd category. |
605 category := mthd category. |
604 ] |
606 ] |
605 ]. |
607 ]. |
606 |
608 |
909 |
911 |
910 addSpec:aSpecification builder:aBuilder in:aFrame |
912 addSpec:aSpecification builder:aBuilder in:aFrame |
911 "build view and subviews from aSpecification into a frame. The top view |
913 "build view and subviews from aSpecification into a frame. The top view |
912 is returned. The contained components of a spec are set to nil |
914 is returned. The contained components of a spec are set to nil |
913 " |
915 " |
914 |
916 |cls| |
915 className notNil ifTrue:[ |
917 |
916 aBuilder applicationClass:(Smalltalk classNamed:className). |
918 cls := self resolveName:className. |
|
919 |
|
920 cls notNil ifTrue:[ |
|
921 aBuilder applicationClass:cls. |
917 ]. |
922 ]. |
918 |
923 |
919 aBuilder componentCreationHook:[:aView :aSpec :aBdr||sv p s n| |
924 aBuilder componentCreationHook:[:aView :aSpec :aBdr||sv p s n| |
920 p := ViewProperty new. |
925 p := ViewProperty new. |
921 s := aSpec copy. |
926 s := aSpec copy. |
1024 self singleSelection notNil ifTrue:[ |
1029 self singleSelection notNil ifTrue:[ |
1025 self withSelectionHiddenDo:[ |
1030 self withSelectionHiddenDo:[ |
1026 self transaction:#specification selectionDo:[:aView| |
1031 self transaction:#specification selectionDo:[:aView| |
1027 builder := UIBuilder new. |
1032 builder := UIBuilder new. |
1028 className notNil ifTrue:[ |
1033 className notNil ifTrue:[ |
1029 builder applicationClass:(Smalltalk classNamed:className). |
1034 builder applicationClass:(self resolveName:className). |
1030 ]. |
1035 ]. |
1031 props := self propertyOfView:aView. |
1036 props := self propertyOfView:aView. |
1032 name := (aSpec name) withoutSeparators. |
1037 name := (aSpec name) withoutSeparators. |
1033 |
1038 |
1034 name = props name ifFalse:[ |
1039 name = props name ifFalse:[ |
1231 props notNil ifTrue:[ |
1236 props notNil ifTrue:[ |
1232 view := props view. |
1237 view := props view. |
1233 spec := args at:1. |
1238 spec := args at:1. |
1234 builder := UIBuilder new. |
1239 builder := UIBuilder new. |
1235 className notNil ifTrue:[ |
1240 className notNil ifTrue:[ |
1236 builder applicationClass:(Smalltalk classNamed:className). |
1241 builder applicationClass:(self resolveName:className). |
1237 ]. |
1242 ]. |
1238 props spec:spec. |
1243 props spec:spec. |
1239 self rebuildView:view fromSpec:spec withBuilder:builder. |
1244 self rebuildView:view fromSpec:spec withBuilder:builder. |
1240 treeView propertyChanged:props. |
1245 treeView propertyChanged:props. |
1241 ] |
1246 ] |