{"action":"opened","issue":{"url":"https://api.github.com/repos/tom95/Pheno/issues/52","repository_url":"https://api.github.com/repos/tom95/Pheno","labels_url":"https://api.github.com/repos/tom95/Pheno/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/tom95/Pheno/issues/52/comments","events_url":"https://api.github.com/repos/tom95/Pheno/issues/52/events","html_url":"https://github.com/tom95/Pheno/issues/52","id":334964456,"node_id":"MDU6SXNzdWUzMzQ5NjQ0NTY=","number":52,"title":"PHStyleContext installing itself into any Morph causes issues","user":{"login":"MrModder","id":1346493,"node_id":"MDQ6VXNlcjEzNDY0OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1346493?v=4","gravatar_id":"","url":"https://api.github.com/users/MrModder","html_url":"https://github.com/MrModder","followers_url":"https://api.github.com/users/MrModder/followers","following_url":"https://api.github.com/users/MrModder/following{/other_user}","gists_url":"https://api.github.com/users/MrModder/gists{/gist_id}","starred_url":"https://api.github.com/users/MrModder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrModder/subscriptions","organizations_url":"https://api.github.com/users/MrModder/orgs","repos_url":"https://api.github.com/users/MrModder/repos","events_url":"https://api.github.com/users/MrModder/events{/privacy}","received_events_url":"https://api.github.com/users/MrModder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-22T17:46:49Z","updated_at":"2018-06-22T17:46:49Z","closed_at":null,"author_association":"NONE","body":"We are currently working on our SWT project ([PowerSqueak](https://github.com/hpi-swa-teaching/SWT18-Project-09)) 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.\r\n\r\nFirst 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)\r\n\r\nThis could be fixed, by removing the PHStyleContext before saving a morph, by overriding\r\n``` smalltalk\r\nMorph>>prepareToBeSaved\r\n    \r\n    ...\r\n    self removeProperty: #styleContext.\r\n    ...\r\n```\r\n\r\nAnother issue we ran into occured when we loaded our old SWA game.\r\n\r\nFor some reason the observers in our Game seem to get an update, with the PHStyleContext as an argument.\r\nWe 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.\r\n\r\nIf it is possible, would you please remove the PHStyleContext from any morph that is not currently using pheno"}}
{"actor":{"display_login":"MrModder"}}