Skip to content

Storing (i.e., `#storeOn:`)

Sean DeNigris edited this page Sep 4, 2019 · 2 revisions

The problem is that there is a partial overlap between descriptions and properties. Most built-in description fields are stored as properties, but not all. Thus, when storing the object, ignoring the properties causes lost data, and storing them all results in duplicated storage. There is no meta-information to say which description is stored as a property, which would allow one to distinguish the "extra" properties to be stored. I started to add support, but then noticed that maybe all data should be stored as properties, which would make things easier. On ML, Norbert commented that it reflects mandatory vs. optional fields.

This snippet was part of an experiment to solve. Could be relevant in the future:

descriptionRequired
	<magritteDescription>
	^ MABooleanDescription new
		accessor: (MAPropertySelectorAccessor selector:  #required);
		label: 'Required';
		priority: 220;
		default: self class defaultRequired;
		yourself
Clone this wiki locally