Hi
Have you ever used an auto accessor and been annoyed by the fact that
the suggested type of the mutators argument is 'anObject'? I mean we
have a description that has a kind, so why not a suggested type? The
problem is that an accessor doesn't know to what description it
belongs. So is there a way around this? Yes, we can look at the first
argument in #write:to:. However, only doing
'a', anObject class name
Will not work. For booleans this will either result in 'aTrue' or
'aFalse'. Other cases that have to be taken care of are:
- Strings
- Symbols
- Numbers
- Collections (expect dictionaries, but I don't think they are not
supported by Magritte)
- (Pier) structures
additionally we need to take nil into account.
So it may be a better idea to implement #suggestedType in various classes.
Opinions?
Cheers
Philippe
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki