[BUG](FIX] Class Hierachy Browser in MVC

Boris Gaertner squeak-dev at lists.squeakfoundation.org
Mon Oct 21 17:39:17 UTC 2002


This is a multi-part message in MIME format.

------=_NextPart_000_002E_01C27939.8AF1E2C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Scott Wallace <scott.wallace at squeakland.org> wrote:
> Hi, Boris,
> 
> I believe that where in your code you have:
> 
>    messageCategoryListView controller:
>      ((messageCategoryListView defaultControllerClass new) 
> terminateDuringSelect: true).
> 
> you can more efficiently substitute simply:
> 
>    messageCategoryListView controller terminateDuringSelect: true.
> 
> This applies to both methods in your fileout.

Yes, Scott, you are right.

> If you'd care to verify this, and -- if you agree -- to send me a 
> revised fileout with those simplifications, I'll get it into the 
> update stream.

I verified it. Enclosed you find the improved fileout.

> Thanks,
Thank you a lot for your review,

Boris

------=_NextPart_000_002E_01C27939.8AF1E2C0
Content-Type: application/octet-stream;
	name="CHBBug.2.cs"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="CHBBug.2.cs"

'From Squeak3.3alpha of 30 January 2002 [latest update: #4981] on 21 =
October 2002 at 7:29:54 pm'!=0D"Change Set:		CHBBug=0DDate:			20 October =
2002=0DAuthor:			Boris Gaertner (with an improvement from Scott =
Wallace)=0D=0DUnder MVC, the class hierarchy browser has a very peculiar =
little bug:=0D1. Open a Class Hierarchy Browser in an MVC Project=0D2. =
Select Class OrderedCollection (or any other class with class =
methods)=0D3 Press the Class button.=0D4. Press the Button '?' to see =
the comment.=0D5. Select a method category.=0D=0DThe Button '?' is now =
deselected and the button class is selected.=0DHowever, the part of the =
class button that was covered by the scrollbar=0Dis not selected.=0DThe =
same bug is visible in the browser that shows the classes of =
one=0Dsystem category.=0DThe reason is that the controller of the =
category list view is not=0Dcreated with the option =
terminateDuringSelect.=0D=0DThis change set fixes that bug for both =
browsers."!=0D=0D=0D!Browser methodsFor: 'initialize-release' stamp: 'BG =
10/21/2002 19:29'!=0DopenEditString: aString=0D        "Create a =
pluggable version of all the views for a Browser, including views and =
controllers."=0D        | systemCategoryListView classListView =0D       =
 messageCategoryListView messageListView browserCodeView topView =
switchView underPane y optionalButtonsView annotationPane |=0D=0D        =
self couldOpenInMorphic ifTrue: [^ self openAsMorphEditing: aString].=0D =
       "Sensor leftShiftDown ifTrue: [^ self openAsMorphEditing: =
aString].=0D                uncomment-out for testing morphic browser =
embedded in mvc project"=0D=0D        topView _ StandardSystemView new =
model: self.=0D        topView borderWidth: 1. "label and minSize taken =
care of by caller"=0D=0D        systemCategoryListView _ =
PluggableListView on: self=0D                list: =
#systemCategoryList=0D                selected: =
#systemCategoryListIndex=0D                changeSelected: =
#systemCategoryListIndex:=0D                menu: =
#systemCategoryMenu:=0D                keystroke: =
#systemCatListKey:from:.=0D        systemCategoryListView window: (0 @ 0 =
extent: 50 @ 70).=0D        topView addSubView: =
systemCategoryListView.=0D=0D        classListView _ PluggableListView =
on: self=0D                list: #classList=0D                selected: =
#classListIndex=0D                changeSelected: #classListIndex:=0D    =
            menu: #classListMenu:shifted:=0D                keystroke: =
#classListKey:from:.=0D        classListView window: (0 @ 0 extent: 50 @ =
62).=0D        topView addSubView: classListView toRightOf: =
systemCategoryListView.=0D=0D        switchView _ self =
buildInstanceClassSwitchView.=0D        switchView borderWidth: 1.=0D    =
    topView addSubView: switchView below: classListView.=0D=0D        =
messageCategoryListView _ PluggableListView on: self=0D                =
list: #messageCategoryList=0D                selected: =
#messageCategoryListIndex=0D                changeSelected: =
#messageCategoryListIndex:=0D                menu: =
#messageCategoryMenu:. =0D        messageCategoryListView controller =
terminateDuringSelect: true.=0D        messageCategoryListView window: =
(0 @ 0 extent: 50 @ 70).=0D        topView addSubView: =
messageCategoryListView toRightOf: classListView.=0D=0D        =
messageListView _ PluggableListView on: self=0D                list: =
#messageList=0D                selected: #messageListIndex=0D            =
    changeSelected: #messageListIndex:=0D                menu: =
#messageListMenu:shifted:=0D                keystroke: =
#messageListKey:from:.=0D        messageListView window: (0 @ 0 extent: =
50 @ 70).=0D        messageListView menuTitleSelector: =
#messageListSelectorTitle.=0D        topView addSubView: messageListView =
toRightOf: messageCategoryListView.=0D=0D       self =
wantsAnnotationPane=0D                ifTrue:=0D                        =
[annotationPane _ PluggableTextView on: self=0D                          =
      text: #annotation accept: nil=0D                                =
readSelection: nil menu: nil.=0D                        annotationPane =
window: (0 at 0 extent: 200 at self optionalAnnotationHeight).=0D              =
          topView addSubView: annotationPane below: =
systemCategoryListView.=0D                        underPane _ =
annotationPane.=0D                        y _ 110 - self =
optionalAnnotationHeight]=0D                ifFalse: [=0D                =
        underPane _ systemCategoryListView.=0D                        y =
_ 110].=0D=0D        self wantsOptionalButtons ifTrue:=0D                =
[optionalButtonsView _ self buildOptionalButtonsView.=0D                =
optionalButtonsView borderWidth: 1.=0D                topView =
addSubView: optionalButtonsView below: underPane.=0D                =
underPane _ optionalButtonsView.=0D                y _ y - self =
optionalButtonHeight].=0D=0D        browserCodeView _ PluggableTextView =
on: self =0D                        text: #contents accept: =
#contents:notifying:=0D                        readSelection: =
#contentsSelection menu: #codePaneMenu:shifted:.=0D        =
browserCodeView window: (0 at 0 extent: 200 at y).=0D        topView =
addSubView: browserCodeView below: underPane.=0D        aString =
ifNotNil: [browserCodeView editString: aString.=0D                       =
 browserCodeView hasUnacceptedEdits: true].=0D        topView =
setUpdatablePanesFrom: #(systemCategoryList classList =
messageCategoryList messageList).=0D=0D        ^ topView! =
!=0D=0D!Browser methodsFor: 'initialize-release' stamp: 'BG 10/21/2002 =
19:29'!=0DopenSystemCatEditString: aString=0D	"Create a pluggable =
version of all the views for a Browser, including views and controllers. =
 The top list view is of the currently selected system class category--a =
single item list."=0D	| systemCategoryListView classListView =
messageCategoryListView messageListView browserCodeView topView =
switchView y annotationPane underPane optionalButtonsView |=0D=0D	=
Smalltalk isMorphic ifTrue: [^ self openAsMorphSysCatEditing: =
aString].=0D=0D	topView _ (StandardSystemView new) model: self.=0D	=
topView borderWidth: 1.=0D		"label and minSize taken care of by =
caller"=0D=0D	systemCategoryListView _ PluggableListView on: self=0D		=
list: #systemCategorySingleton=0D		selected: #indexIsOne =0D		=
changeSelected: #indexIsOne:=0D		menu: #systemCatSingletonMenu:=0D		=
keystroke: #systemCatSingletonKey:from:.=0D	systemCategoryListView =
window: (0 @ 0 extent: 200 @ 12).=0D	topView addSubView: =
systemCategoryListView.=0D=0D	classListView _ PluggableListView on: =
self=0D		list: #classList=0D		selected: #classListIndex=0D		=
changeSelected: #classListIndex:=0D		menu: #classListMenu:shifted:=0D		=
keystroke: #classListKey:from:.=0D	classListView window: (0 @ 0 extent: =
67 @ 62).=0D	topView addSubView: classListView below: =
systemCategoryListView.=0D=0D	messageCategoryListView _ =
PluggableListView on: self=0D		list: #messageCategoryList=0D		selected: =
#messageCategoryListIndex=0D		changeSelected: =
#messageCategoryListIndex:=0D		menu: #messageCategoryMenu:.=0D	=
messageCategoryListView controller terminateDuringSelect: true.=0D	=
messageCategoryListView window: (0 @ 0 extent: 66 @ 70).=0D	topView =
addSubView: messageCategoryListView toRightOf: classListView.=0D=0D	=
switchView _ self buildInstanceClassSwitchView.=0D	switchView =0D		=
window: switchView window =0D		viewport: (classListView viewport =
bottomLeft =0D					corner: messageCategoryListView viewport =
bottomLeft).=0D	switchView borderWidth: 1.=0D	topView addSubView: =
switchView below: classListView.=0D=0D	messageListView _ =
PluggableListView on: self=0D		list: #messageList=0D		selected: =
#messageListIndex=0D		changeSelected: #messageListIndex:=0D		menu: =
#messageListMenu:shifted:=0D		keystroke: #messageListKey:from:.=0D	=
messageListView menuTitleSelector: #messageListSelectorTitle.=0D	=
messageListView window: (0 @ 0 extent: 67 @ 70).=0D	topView addSubView: =
messageListView toRightOf: messageCategoryListView.=0D=0D	 self =
wantsAnnotationPane=0D		ifTrue:=0D			[annotationPane _ PluggableTextView =
on: self=0D				text: #annotation accept: nil=0D				readSelection: nil =
menu: nil.=0D			annotationPane window: (0 at 0 extent: 200 at self =
optionalAnnotationHeight).=0D			topView addSubView: annotationPane =
below: switchView.=0D			y _ 110 - 12 - self optionalAnnotationHeight.=0D	=
		underPane _ annotationPane]=0D		ifFalse:=0D			[y _ 110 - 12.=0D			=
underPane _ switchView].=0D=0D	self wantsOptionalButtons ifTrue:=0D		=
[optionalButtonsView _ self buildOptionalButtonsView.=0D		=
optionalButtonsView borderWidth: 1.=0D		topView addSubView: =
optionalButtonsView below: underPane.=0D		underPane _ =
optionalButtonsView.=0D		y _ y - self optionalButtonHeight].=0D=0D	=
browserCodeView _ PluggableTextView on: self =0D			text: #contents =
accept: #contents:notifying:=0D			readSelection: #contentsSelection =
menu: #codePaneMenu:shifted:.=0D	browserCodeView window: (0 at 0 extent: =
200 at y).=0D	topView addSubView: browserCodeView below: underPane.=0D	=
aString ifNotNil: [browserCodeView editString: aString.=0D			=
browserCodeView hasUnacceptedEdits: true].=0D	topView =
setUpdatablePanesFrom: #(classList messageCategoryList messageList).=0D	=
^ topView! !=0D=0D
------=_NextPart_000_002E_01C27939.8AF1E2C0--




More information about the Squeak-dev mailing list