I thought that you would store two environments in PRStructure and
that PRPierFrame (or your custom subclass) would depending on the
context (the command) use a different one.
Thanks for idea of using overriding the behaviour in PRPierFrame -
previously I'd struggled modifying environments in PRContentsWidget.
The solution I've finally arrived at is:
1) I've added a method to my custom kernel #editingEnvironment
2) I've overridden #environment in PRPierFrame so that it now reads:
environment
| environment |
(self context command isView or: [self context command isQuick]) ifTrue: [
environment := self context structure environment
] ifFalse: [
environment := self kernel editingEnvironment
].
^ environment
So much simpler than my other two attempts - thanks again
Nick