Damien Pollet wrote:
I'm trying to make a custom header as a subclass
of PRHeaderWidget.
I'd like it to have a title and a subtitle so I made
subtitleDescription, defaults, and accessor inspired by the ones for
title in PRHeaderWidget.
Changing the subtitle from the Settings command works, but not the
title. As far as I understand it, the PRComponent holds the state to
configure instances of the PRHeaderWidget. When changing its settings,
it will update that state, unless it has fields with the same name.
In this case, #title from PRComponent is masking the one in
PRHeaderWidget, so when I change the Title from the web, I'm changing
the structure instead of the seaside component configuration... is
this really wanted? shouldn't the Edit command modify the structure
and Settings the component settings? Or was the idea that Edits are
persisted but not Settings ?
Dear Damien,
from what I remember the title in the header widget is set to the name
of the PRKernel which you are using. To rename this. I think that
(PRKernel instanceNamed: 'pier') name: 'new name'. should do it. In the
Pier-PersistencyManager package I provide a control panel UI for
renaming and adding/removing kernels. I havent had a chance to fully get
this working in Seaside 2.8, but if you are only using a non-magma
persistency it should be ok.
Keith