equal
deleted
inserted
replaced
813 |
813 |
814 "Modified: / 25.10.1997 / 19:22:17 / cg" |
814 "Modified: / 25.10.1997 / 19:22:17 / cg" |
815 ! |
815 ! |
816 |
816 |
817 generateWindowSpecMethodSource |
817 generateWindowSpecMethodSource |
818 |spec str code category cls mthd| |
818 |spec str code category cls mthd specCode| |
819 |
819 |
820 spec := OrderedCollection new. |
820 spec := OrderedCollection new. |
821 |
821 |
822 self subViews do:[:aView| |
822 self subViews do:[:aView| |
823 aView ~~ inputView ifTrue:[ |
823 aView ~~ inputView ifTrue:[ |
825 ] |
825 ] |
826 ]. |
826 ]. |
827 spec := treeView generateFullSpecForComponents:spec. |
827 spec := treeView generateFullSpecForComponents:spec. |
828 str := WriteStream on:String new. |
828 str := WriteStream on:String new. |
829 UISpecification prettyPrintSpecArray:spec on:str indent:5. |
829 UISpecification prettyPrintSpecArray:spec on:str indent:5. |
|
830 specCode := str contents. |
|
831 |
|
832 (specCode includes:$!!) ifTrue:[ |
|
833 "/ oops - must be chunk format ... |
|
834 str := WriteStream on:String new. |
|
835 str nextPutAllAsChunk:specCode. |
|
836 specCode := str contents. |
|
837 ]. |
830 |
838 |
831 "/ if that method already exists, do not overwrite the category |
839 "/ if that method already exists, do not overwrite the category |
832 |
840 |
833 category := 'interface specs'. |
841 category := 'interface specs'. |
834 cls := self resolveName:className. |
842 cls := self resolveName:className. |
857 ]. |
865 ]. |
858 code := code |
866 code := code |
859 , '\' |
867 , '\' |
860 , ' <resource: #canvas>\\' |
868 , ' <resource: #canvas>\\' |
861 , ' ^\' |
869 , ' ^\' |
862 , ' ', str contents |
870 , ' ', specCode |
863 , '\' |
871 , '\' |
864 , '!! !!' |
872 , '!! !!' |
865 , '\\'. |
873 , '\\'. |
866 |
874 |
867 ^ code withCRs |
875 ^ code withCRs |