|Anonymous | Login||09-20-2021 08:34 UTC|
|Main | My View | View Issues | Change Log | Docs|
|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|
|Summary||0007302: Kedama patches miss a case|
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).
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;
self color: self standardViewerColor.
self addHeaderMorphWithBarHeight: anInteger includeDismissButton: aBoolean.
ifFalse: "Reincarnating an pre-existing list"
[:aCat | self addCategoryViewerFor: aCat]]
ifTrue: "starting fresh"
(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)
|There are no notes attached to this issue.|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
27 total queries executed.|
24 unique queries executed.