# HG changeset patch # User Claus Gittinger # Date 1243794397 -7200 # Node ID 9f95bababe1b862491393a60390f0ee9503b92c5 # Parent 53294c69f292732fef75417c350e4af5fd10bf8e fixes to allow for table-view spec to be inline (no class/selector) diff -r 53294c69f292 -r 9f95bababe1b UIPainter.st --- a/UIPainter.st Sun May 31 20:25:26 2009 +0200 +++ b/UIPainter.st Sun May 31 20:26:37 2009 +0200 @@ -3177,9 +3177,9 @@ self acceptOrIgnoreSectionModification. editor := DataSetBuilder new. + editor masterApplication:self. specTool := self specTool. - editor masterApplication:self. self isEditingSpecOnly ifFalse:[ editor specClass: cls. editor rowClassName:(specTool specification rowClassName). @@ -3187,40 +3187,48 @@ columnHolder := specTool aspectFor:#columnHolder. tableSelector := columnHolder value. - tableSelector := tableSelector size ~~ 0 ifTrue:[tableSelector asSymbol] - ifFalse:[nil]. + tableSelector := tableSelector notEmptyOrNil + ifTrue:[tableSelector asSymbol] + ifFalse:[nil]. (self isEditingSpecOnly not and:[tableSelector notNil and:[cls class includesSelector:tableSelector]]) ifTrue:[ editor openModalOnClass:cls andSelector:tableSelector ] ifFalse:[ + editor editingSpecOnly:true. + columns := specTool specification columns. - columns size ~~ 0 ifTrue:[ editor openModalOnResourceSpec:columns ] ifFalse:[ editor openModal - ] + ]. ]. - editor hasSaved ifTrue:[ - specTool specification - columns:nil; - rowClassName:(editor rowClassName). - - tableSelector = editor specSelector ifFalse:[ - columnHolder value:(editor specSelector). - self accept. + self isEditingSpecOnly ifFalse:[ + editor hasSaved ifTrue:[ + specTool specification + columns:nil; + rowClassName:(editor rowClassName). + + tableSelector = editor specSelector ifFalse:[ + columnHolder value:(editor specSelector). + self accept. + ]. + ^ self ]. - ^ self ]. - (editor modified and:[tableSelector isNil]) ifTrue:[ - specTool specification - columns:(editor columns); - rowClassName:(editor rowClassName). - self modifiedChannel value:true. + tableSelector isNil ifTrue:[ + editor hasSaved ifTrue:[ + editor modified ifFalse:[ + specTool specification + columns:(editor acceptedColumns); + rowClassName:(editor rowClassName). + self modifiedChannel value:true. + ]. + ]. ]. "Modified: / 12-01-2008 / 10:31:47 / cg" @@ -3562,7 +3570,6 @@ |key| anEvent isKeyPressEvent ifTrue:[ - anEvent targetView == treeView ifFalse:[^ false]. treeView hasFocus ifFalse:[^ false]. @@ -4348,15 +4355,19 @@ super closeRequest. - treeView model removeDependent:self. - "/ self painter release. - + painterView notNil ifTrue:[ + painterView masterApplication:nil. + painterView closeRequest. + ]. + treeView notNil ifTrue:[ + treeView model removeDependent:self. + ]. selectionPanel notNil ifTrue:[ selectionPanel masterApplication:nil. selectionPanel closeRequest ]. - selectionPanel := nil. - treeView := nil. + "/ selectionPanel := nil. + "/ treeView := nil. ! closeRequestFor:aTopView @@ -4588,6 +4599,21 @@ "Modified: / 13.7.1999 / 21:26:52 / cg" ! +release + super release. + + painterView notNil ifTrue:[ + painterView destroy. + ]. + selectionPanel notNil ifTrue:[ + selectionPanel masterApplication:nil. + selectionPanel window destroy + ]. + selectionPanel := nil. + treeView := nil. + painterView := nil. +! + selectionPanelClass ^ SelectionPanelClass ! @@ -5277,7 +5303,7 @@ ] ]. spec notNil ifTrue:[ - spec inspect + spec inspect. ] !