Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007302 [Squeak] Morphic major always 03-01-09 05:23 03-01-09 05:23
Reporter rhawley View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 3.10.2
Summary 0007302: Kedama patches miss a case
Description Patches to code to account for Kedama have not properly taken into account a menu item from the debug halo. There is a selection: 'viewer for Morph' which is not working and produces a serious error.

Although it is (normally) possible for a viewer to be opened on aMorph, it should be noted that the code is actually written in terms of a viewer being opened on aPlayer (because that is the usual case).

The problem is that modifications to the code to cope with Kedama send the message #costume to the variable aPlayer when in fact aPlayer could be aMorph, so therefore an error is generated because Morph does not understand #costume.

The fix would be for the patches to cope with kedama to check that aPlayer is actually a Player and behave accordingly.

The cases I have found are: in CategoryViewer isSpecialPatchReceiver:and: and in StandardViewer initializeFor:barHeight:includeDismissButton:showCategories: (there are possibly in other places where this problem also occurs).
Additional Information Problem occurs with last line of this StandardViewer method:

initializeFor: aPlayer barHeight: anInteger includeDismissButton: aBoolean showCategories: categoryInfo
    "Initialize the receiver to be a look inside the given Player. The categoryInfo, if present, describes which categories should be present in it, in which order"

    scriptedPlayer := aPlayer.
    self listDirection: #topToBottom;
        hResizing: #shrinkWrap;
        vResizing: #shrinkWrap;
        borderWidth: 1.
    self color: self standardViewerColor.
    self addHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean.

    categoryInfo isEmptyOrNil
        ifFalse: "Reincarnating an pre-existing list"
            [categoryInfo do:
                [:aCat | self addCategoryViewerFor: aCat]]
        ifTrue: "starting fresh"
            [self addSearchPane.
            self addCategoryViewer.
            self addCategoryViewer.
            (scriptedPlayer costume isMemberOf: KedamaMorph) ifTrue: [self addCategoryViewer].

Problem occurs with the 'aPlayer costume' bit of this method from CategoryViewer:

isSpecialPatchReceiver: aPlayer and: cmd

    ^ (aPlayer costume renderedMorph class = KedamaPatchMorph) and: [
        (#(#redComponentInto: #greenComponentInto: #blueComponentInto:
            #redComponentFrom: #greenComponentFrom: #blueComponentFrom:) includes: cmd)

Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
03-01-09 05:23 rhawley New Issue

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
27 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker