3175 ]. |
3175 ]. |
3176 |
3176 |
3177 self acceptOrIgnoreSectionModification. |
3177 self acceptOrIgnoreSectionModification. |
3178 |
3178 |
3179 editor := DataSetBuilder new. |
3179 editor := DataSetBuilder new. |
|
3180 editor masterApplication:self. |
3180 specTool := self specTool. |
3181 specTool := self specTool. |
3181 |
3182 |
3182 editor masterApplication:self. |
|
3183 self isEditingSpecOnly ifFalse:[ |
3183 self isEditingSpecOnly ifFalse:[ |
3184 editor specClass: cls. |
3184 editor specClass: cls. |
3185 editor rowClassName:(specTool specification rowClassName). |
3185 editor rowClassName:(specTool specification rowClassName). |
3186 ]. |
3186 ]. |
3187 columnHolder := specTool aspectFor:#columnHolder. |
3187 columnHolder := specTool aspectFor:#columnHolder. |
3188 tableSelector := columnHolder value. |
3188 tableSelector := columnHolder value. |
3189 |
3189 |
3190 tableSelector := tableSelector size ~~ 0 ifTrue:[tableSelector asSymbol] |
3190 tableSelector := tableSelector notEmptyOrNil |
3191 ifFalse:[nil]. |
3191 ifTrue:[tableSelector asSymbol] |
|
3192 ifFalse:[nil]. |
3192 |
3193 |
3193 (self isEditingSpecOnly not |
3194 (self isEditingSpecOnly not |
3194 and:[tableSelector notNil |
3195 and:[tableSelector notNil |
3195 and:[cls class includesSelector:tableSelector]]) ifTrue:[ |
3196 and:[cls class includesSelector:tableSelector]]) ifTrue:[ |
3196 editor openModalOnClass:cls andSelector:tableSelector |
3197 editor openModalOnClass:cls andSelector:tableSelector |
3197 ] ifFalse:[ |
3198 ] ifFalse:[ |
|
3199 editor editingSpecOnly:true. |
|
3200 |
3198 columns := specTool specification columns. |
3201 columns := specTool specification columns. |
3199 |
|
3200 columns size ~~ 0 ifTrue:[ |
3202 columns size ~~ 0 ifTrue:[ |
3201 editor openModalOnResourceSpec:columns |
3203 editor openModalOnResourceSpec:columns |
3202 ] ifFalse:[ |
3204 ] ifFalse:[ |
3203 editor openModal |
3205 editor openModal |
3204 ] |
|
3205 ]. |
|
3206 |
|
3207 editor hasSaved ifTrue:[ |
|
3208 specTool specification |
|
3209 columns:nil; |
|
3210 rowClassName:(editor rowClassName). |
|
3211 |
|
3212 tableSelector = editor specSelector ifFalse:[ |
|
3213 columnHolder value:(editor specSelector). |
|
3214 self accept. |
|
3215 ]. |
3206 ]. |
3216 ^ self |
3207 ]. |
3217 ]. |
3208 |
3218 |
3209 self isEditingSpecOnly ifFalse:[ |
3219 (editor modified and:[tableSelector isNil]) ifTrue:[ |
3210 editor hasSaved ifTrue:[ |
3220 specTool specification |
3211 specTool specification |
3221 columns:(editor columns); |
3212 columns:nil; |
3222 rowClassName:(editor rowClassName). |
3213 rowClassName:(editor rowClassName). |
3223 self modifiedChannel value:true. |
3214 |
|
3215 tableSelector = editor specSelector ifFalse:[ |
|
3216 columnHolder value:(editor specSelector). |
|
3217 self accept. |
|
3218 ]. |
|
3219 ^ self |
|
3220 ]. |
|
3221 ]. |
|
3222 |
|
3223 tableSelector isNil ifTrue:[ |
|
3224 editor hasSaved ifTrue:[ |
|
3225 editor modified ifFalse:[ |
|
3226 specTool specification |
|
3227 columns:(editor acceptedColumns); |
|
3228 rowClassName:(editor rowClassName). |
|
3229 self modifiedChannel value:true. |
|
3230 ]. |
|
3231 ]. |
3224 ]. |
3232 ]. |
3225 |
3233 |
3226 "Modified: / 12-01-2008 / 10:31:47 / cg" |
3234 "Modified: / 12-01-2008 / 10:31:47 / cg" |
3227 ! |
3235 ! |
3228 |
3236 |
4346 |
4353 |
4347 self askForModification ifFalse:[^self]. |
4354 self askForModification ifFalse:[^self]. |
4348 |
4355 |
4349 super closeRequest. |
4356 super closeRequest. |
4350 |
4357 |
4351 treeView model removeDependent:self. |
4358 painterView notNil ifTrue:[ |
4352 "/ self painter release. |
4359 painterView masterApplication:nil. |
4353 |
4360 painterView closeRequest. |
|
4361 ]. |
|
4362 treeView notNil ifTrue:[ |
|
4363 treeView model removeDependent:self. |
|
4364 ]. |
4354 selectionPanel notNil ifTrue:[ |
4365 selectionPanel notNil ifTrue:[ |
4355 selectionPanel masterApplication:nil. |
4366 selectionPanel masterApplication:nil. |
4356 selectionPanel closeRequest |
4367 selectionPanel closeRequest |
4357 ]. |
4368 ]. |
4358 selectionPanel := nil. |
4369 "/ selectionPanel := nil. |
4359 treeView := nil. |
4370 "/ treeView := nil. |
4360 ! |
4371 ! |
4361 |
4372 |
4362 closeRequestFor:aTopView |
4373 closeRequestFor:aTopView |
4363 "handles a close request for a specific view" |
4374 "handles a close request for a specific view" |
4364 |
4375 |
4584 self window topView raise. |
4595 self window topView raise. |
4585 Delay waitForSeconds:0.25. |
4596 Delay waitForSeconds:0.25. |
4586 self window topView raise |
4597 self window topView raise |
4587 ] fork. |
4598 ] fork. |
4588 "Modified: / 13.7.1999 / 21:26:52 / cg" |
4599 "Modified: / 13.7.1999 / 21:26:52 / cg" |
|
4600 ! |
|
4601 |
|
4602 release |
|
4603 super release. |
|
4604 |
|
4605 painterView notNil ifTrue:[ |
|
4606 painterView destroy. |
|
4607 ]. |
|
4608 selectionPanel notNil ifTrue:[ |
|
4609 selectionPanel masterApplication:nil. |
|
4610 selectionPanel window destroy |
|
4611 ]. |
|
4612 selectionPanel := nil. |
|
4613 treeView := nil. |
|
4614 painterView := nil. |
4589 ! |
4615 ! |
4590 |
4616 |
4591 selectionPanelClass |
4617 selectionPanelClass |
4592 ^ SelectionPanelClass |
4618 ^ SelectionPanelClass |
4593 ! |
4619 ! |