[comp.lang.smalltalk] St/V Mac fix

gollman@tuvie (Georg Gollman) (05/31/89)

To whom it may concern:

I have had a bit of trouble with St/V Mac on my MacII with 2 monitors
(seems to be a bit of trashing of the WindowManagerPort). After
some peeking and poking around I came up with the following fix:

! SystemDictionary methods !
multipleMonitors
    "Seems to fix the problem St/V Mac has with multiple monitors
     under Multifinder. But no guaranties I
     NOTE: putting this into startUp does+nt help.
     Written by G.Gollmann 31.5.89"

    (MPointer fromInteger:
     (MHandle fromInteger:
      (Window windowManagerPort longAtOffset: 24)) deref)
    wordAtOffset: 8 put: Screen boundingBox right! !

Execute "Smalltalk multipleMonitors" as soon as the system has started up,
putting it into "Smalltalk startUp" does'nt work. Use with caution, I have
just tested it for a short while !!!

(BTW, I have no response from digitalk yet, but then I just mailed yesterday ...)

				Have fun
					Georg

Georg Gollmann                                  e-mail: gollman@tuvie.at
TU Wien, EDVZ                               Gusshausstr. 25, A-1040 Wien

mikel@apple.com (mikel evins) (06/02/89)

In article <702@tuvie> gollman@tuvie (Georg Gollman) writes:
>I have had a bit of trouble with St/V Mac on my MacII with 2 monitors
>(seems to be a bit of trashing of the WindowManagerPort)...
> (BTW, I have no response from digitalk yet, but then I just mailed 
yesterday ...)

DigiTalk supplies a partial fix for this problem that seems to work. I say 
it is a partial fix because it works only with Finder, not with 
MultiFinder (according to the comments that came with the code). 
Accordingly, I have not bothered to use it, except to confirm that it fixes the problem in the situation that Digitalk says it will, as the machine on which I use two montiors is dedicated to activities that more or less require use of MultiFinder. SmallTalk/V is thus relegated to another machine with only 1 monitor.
I regard this as a fairly serious problem with SmallTalk/V that I can only 
assume Digitalk is hard at work fixing, along with the abnormal behavior 
of its text editor (in violation of standard Mac interface conventions).

--mikel

gollman@tuvie (Georg Gollman) (10/30/89)

My teeny weeny code donation ...

Just a small fix to ClassHierarchyBrowser>>findClass in Smalltalk/V Mac R1.10.

I added a check to make sure that the 'class' is really a class, otherwise
searching for 'Memory' and things like that will produce a walkback.

Georg Gollmann                   Please reply to:       gollman@tuvie.at
TU Wien, EDVZ                                 or: gollmann@egh780.una.at

------------------------------- cut here ------------------------------

!ClassHierarchyBrowser methods !

findClass
    "Prompt for a class to search for, and position at
     that point in the hierarchy."
    | className class supers blanks result |

    result := pane saveChanges.
    result isNil ifTrue: [ ^ self ].
    result ifTrue:  [ pane saveContents ]
           ifFalse: [ pane revertToSaved ].

    className := Prompter prompt: 'Name of class:' default: ''.
    (className isNil or: [className isEmpty])
        ifTrue: [ ^ self ].
    className := className asSymbol.
    class := Smalltalk at: className ifAbsent: [
        ^ Menu message: 'Class "', className,
                        '" not found in Smalltalk.'
    ].

    "Here is the check."
    (class isKindOf: Class) ifFalse: [
        ^ Menu message: '"', className, '" is no class.'
    ].

    CursorManager execute change.
    supers := (Array with: class), class allSuperclasses.
    blanks := 0.
    1 to: supers size do: [ :i |
        (originalClasses includes: (supers at: i))
           ifTrue: [ blanks := i ]
    ].
    blanks = 0 ifTrue: [
        CursorManager normal change.
        ^ Menu message: 'Class "', className,
                        '" not found in this browser.'
    ].
    supers do: [ :cl |
        hiddenClasses remove: cl ifAbsent: []
    ].
    self update: originalClasses.
    selectedClass isNil ifTrue: [
        self classHighlight: true.
        (pane menuBar menuAt: 'Methods') enable
    ].
    selectedClass :=
        ((String new: (blanks - 1 max: 0)) atAllPut: $ ),
            class name.
    methodSelectedLast := false.
    self update.
    CursorManager normal change.! !