I'd like a hook to specify default values more dynamically. The use case is
that I created a glue layer between Magritte and NeoCSV so one can
meta-describe how to extract CSV fields into objects.

For example:
```
descriptionDate
        <magritteDescription>
        
        ^ MADateDescription new
                        accessor: #date;
                        priority: 400;
                        propertyAt: #csvFieldName put: 'Date';
                        propertyAt: #csvReader put: [ :s | (s, '/2017') asDate 
];
                        default: Date today;
                        yourself
```

The problem is that there doesn't seem to be a way to plug #default: above
into NeoCSV because other hooks like #addField:converter: seem to be skipped
for nil values, shortcutting to a statically described per-csv-file
emptyFieldValue.



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Reply via email to