ApplicationModel.st
changeset 2270 a7c797806d46
parent 2262 fc7b2c2f73bd
child 2287 fc04b196d28c
equal deleted inserted replaced
2269:7fae2df3ba48 2270:a7c797806d46
  2035 buildSpec:specToBuild asSubCanvasWithBuilder:aBuilder
  2035 buildSpec:specToBuild asSubCanvasWithBuilder:aBuilder
  2036     "build a subcanvases spec into aSubcanvas"
  2036     "build a subcanvases spec into aSubcanvas"
  2037 
  2037 
  2038     |sameApp prevSpec prevSource|
  2038     |sameApp prevSpec prevSource|
  2039 
  2039 
       
  2040     aBuilder notNil ifTrue:[
       
  2041         prevSpec := aBuilder spec.
       
  2042         prevSource := aBuilder source.
       
  2043     ].
       
  2044 
  2040     builder isNil ifTrue:[
  2045     builder isNil ifTrue:[
  2041         builder := aBuilder.
  2046         builder := aBuilder.
  2042         aBuilder isNil ifTrue:[
  2047         aBuilder isNil ifTrue:[
  2043             self createBuilder
  2048             self createBuilder
  2044         ]
  2049         ]
  2045     ] ifFalse:[
       
  2046         prevSpec := aBuilder spec.
       
  2047         prevSource := aBuilder source.
       
  2048     ].
  2050     ].
  2049 
  2051 
  2050     aBuilder source:self.
  2052     aBuilder source:self.
  2051 
  2053 
  2052     "/ if the subcanvases appModel is NOT the same as
  2054     "/ if the subcanvases appModel is NOT the same as
  2072     ].
  2074     ].
  2073 
  2075 
  2074     prevSpec notNil ifTrue:[
  2076     prevSpec notNil ifTrue:[
  2075         "/ restore state in builder if original builder was used
  2077         "/ restore state in builder if original builder was used
  2076         aBuilder spec:prevSpec.
  2078         aBuilder spec:prevSpec.
       
  2079     ].
       
  2080     prevSource notNil ifTrue:[
       
  2081         "/ restore state in builder if original builder was used
  2077         aBuilder source:prevSource.
  2082         aBuilder source:prevSource.
  2078     ].
  2083     ].
  2079 
  2084 
  2080     ^ aBuilder
  2085     ^ aBuilder
  2081 
  2086 
  2082     "Created: / 18.6.1998 / 20:08:45 / cg"
  2087     "Created: / 18-06-1998 / 20:08:45 / cg"
  2083     "Modified: / 8.7.1998 / 18:30:46 / cg"
  2088     "Modified: / 27-10-2006 / 11:45:25 / cg"
  2084 !
  2089 !
  2085 
  2090 
  2086 buildSubCanvas:spec withBuilder:aBuilder
  2091 buildSubCanvas:spec withBuilder:aBuilder
  2087     "build a subcanvases' spec into aSubcanvas"
  2092     "build a subcanvases' spec into aSubcanvas"
  2088 
  2093 
  2377     "open the window - assumes that the builder has already setup
  2382     "open the window - assumes that the builder has already setup
  2378      the interface."
  2383      the interface."
  2379 
  2384 
  2380     builder openWindow.
  2385     builder openWindow.
  2381 
  2386 
  2382     "Created: 14.2.1997 / 20:20:39 / cg"
  2387     "Created: / 14-02-1997 / 20:20:39 / cg"
       
  2388     "Modified: / 27-10-2006 / 11:49:00 / cg"
  2383 !
  2389 !
  2384 
  2390 
  2385 openWindowAs:windowType
  2391 openWindowAs:windowType
  2386     "open the window - assumes that the builder has already setup the interface. 
  2392     "open the window - assumes that the builder has already setup the interface. 
  2387      The windowType can be any of #slave, #partner, #dialog, #popUp etc."
  2393      The windowType can be any of #slave, #partner, #dialog, #popUp etc."
  2942 ! !
  2948 ! !
  2943 
  2949 
  2944 !ApplicationModel class methodsFor:'documentation'!
  2950 !ApplicationModel class methodsFor:'documentation'!
  2945 
  2951 
  2946 version
  2952 version
  2947     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.230 2006-10-13 16:27:12 cg Exp $'
  2953     ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.231 2006-10-27 12:35:30 cg Exp $'
  2948 ! !
  2954 ! !
  2949 
  2955 
  2950 ApplicationModel initialize!
  2956 ApplicationModel initialize!