On 28 September 2010 09:21, Damien Cassou <damien.cassou(a)gmail.com> wrote:
On Tue, Sep 28, 2010 at 7:44 AM, Lukas Renggli
<renggli(a)gmail.com> wrote:
The description is read-only, so the write
accessor is never used anyway.
The problem is that the readonly attribute is used both to indicate
that it makes no sense to write (e.g., for the full name of PUUSer) or
that the data is immutable (such as for the name attribute of PUUser).
In my goal of persisting the pier wiki to text files, I have to
distinguish between both cases and for the second case, I need to be
able to write. Do you have a solution?
In the case of #fullName this is a derived property, so it is
dynamically calculated from other properties and should not be saved.
In the case of #name this is a read-only property that should not be
changed after instantiation.
Looks like you need to extend the Magritte meta-model to contain such
additional information for persistency (e.g how to set a private
value). For example look at how this is done with the XML serializer
that Philippe wrote.
Lukas
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
--
Lukas Renggli
www.lukas-renggli.ch