[FIX] allow MethodFinder to get resize in MVC

Randal L. Schwartz merlyn at stonehenge.com
Sun Sep 10 01:43:41 UTC 2000

Thanks to Ned Konz for responding quickly to my puzzlement about
why the MethodFinder doesn't get bigger in MVC.

One small change fixes it.  Thanks Ned!

(P.S. I tried to send this from within the image, and it failed,
I think... so here it is manually.)

-------------- next part --------------
'From Squeak2.9alpha of 5 September 2000 [latest update: #2570] on 9 September 2000 at 6:25:18 pm'!
"Change Set:            Fix Method Finder
Date:                   9 September 2000
Author:                 Randal L. Schwartz

Fix SelectorBrowser so that it has no maximum MVC size. This was limiting the size of the MethodFinder under MVC to a (IMHO) too-small window.

!SelectorBrowser methodsFor: 'as yet unclassified' stamp: 'rls 9/9/2000 18:22'!
        "Create a Browser that lets you type part of a selector, shows a list of selectors,
        shows the classes of the one you chose, and spwns a full browser on it.
                SelectorBrowser new open

        | selectorListView typeInView topView classListView exampleView |
        Smalltalk isMorphic ifTrue: [^ self openAsMorph].

        selectorIndex _ classListIndex _ 0.
        topView _ (StandardSystemView new) model: self.
        topView borderWidth: 1.
                "label and minSize taken care of by caller"

        typeInView _ PluggableTextView on: self 
                        text: #contents accept: #contents:notifying:
                        readSelection: #contentsSelection menu: #codePaneMenu:shifted:.
        typeInView window: (0 at 0 extent: 50 at 14);
                askBeforeDiscardingEdits: false.
        topView addSubView: typeInView.

        selectorListView _ PluggableListView on: self
                list: #messageList
                selected: #messageListIndex
                changeSelected: #messageListIndex:
                menu: #selectorMenu:
                keystroke: #messageListKey:from:.
        selectorListView menuTitleSelector: #selectorMenuTitle.
        selectorListView window: (0 @ 0 extent: 50 @ 46).
        topView addSubView: selectorListView below: typeInView.

        classListView _ PluggableListView on: self
                list: #classList
                selected: #classListIndex
                changeSelected: #classListIndex:
                menu: nil       "never anything selected"
                keystroke: #arrowKey:from:.
        classListView menuTitleSelector: #classListSelectorTitle.
        classListView window: (0 @ 0 extent: 50 @ 60).
        topView addSubView: classListView toRightOf: typeInView.

        exampleView _ PluggableTextView on: self 
                        text: #byExample accept: #byExample:
                        readSelection: #contentsSelection menu: #codePaneMenu:shifted:.
        exampleView window: (0 at 0 extent: 100 at 40);
                askBeforeDiscardingEdits: false.
        topView addSubView: exampleView below: selectorListView.

        topView label: 'Method Finder'.
        topView minimumSize: 350 at 250.
        topView subViews do: [:each | each controller].
        topView controller open.

! !
-------------- next part --------------

Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

More information about the Squeak-dev mailing list