Skip to content

PHStyleContext installing itself into any Morph causes issues #52

@LeonMatthes

Description

@LeonMatthes

We are currently working on our SWT project (PowerSqueak) and we have recently discovered, that a PHStyleContext seems to be created for every morph as an extension, which has been causing all kinds of issues.

First and foremost, when serializing the Morph, its PHStyleContext gets saved with it, which causes severe incompatibility between images when loading .morph files (which basically breaks compatibility of saving and loading in PowerSqueak between users who don't have Pheno installed, and users who have)

This could be fixed, by removing the PHStyleContext before saving a morph, by overriding

Morph>>prepareToBeSaved
    
    ...
    self removeProperty: #styleContext.
    ...

Another issue we ran into occured when we loaded our old SWA game.

For some reason the observers in our Game seem to get an update, with the PHStyleContext as an argument.
We don't know, why this happens, as our game does not even use Pheno in any way, shape or form, its not even built by the toolbuilder. This causes a whole load of MessageNotUnderstood exceptions, as our Observer system does not expect this.

If it is possible, would you please remove the PHStyleContext from any morph that is not currently using pheno

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions