Hi all,
I am prototyping an idea using QCMagritte. First time trying QCMagritte.
First time using Magritte seriously, really. :-)
I have a need for a write-once description. Suppose my domain object has two
attributes: a label and a date. Here I want date to be write-once. Meaning,
when instantiating a new object using QCMagritte's add screen, I want to enter
the label and the date. Subsequently, when I edit that object through
QCMagritte, I want date to be read only.
I am ok to be able to change the date using an inspector within Smalltalk.
Here are some possibilities I see:
- Test for nil in the date setter and signal an error when not nil. This isn't
so nice because the UI should not allow the date to be edited in the first
place when it is no longer nil.
- Dynamically change the instance's date description to beReadonly once date
has been set. Is this considered good style?
Hints appreciated.
Pierce
Show replies by date