Overriding convertish registrations?

0 views
Skip to first unread message

Rob Miller

unread,
Mar 15, 2010, 8:32:57 PM3/15/10
to ish.io
Hi there,

I'm just wondering if there's some way to override the default
converters that are registered in the convertish package.
Specifically, I'd like to get a DateTime field returned as a string in
a different format than the ISO format that is used in the
convertish.convert.DateTimeToStringConverter implementation.

The simplegeneric docs tell me that registering more than one function
for the same predicate would raise an error, so that won't work.
AFAICT, the only way for me to get the behavior I want is to subclass
schemaish.DateTime with an empty subclass, and then to register my
converter against my custom class. I can do this, of course, but it
seems like it's more work than it should be.

Am I missing something?

Thanks!

-r

Tim Parkin

unread,
Mar 16, 2010, 6:10:44 AM3/16/10
to is...@googlegroups.com
Heh... not simple at the moment as you've found out..

I'm currently working with Chris on a way of making this a *lot* easier..  simplegeneric wasn't the best solution in hindsight (it did the job at the time though).

I'm going to write up some notes for a proposed new way of dealing with custom schemas/converters and also a way of serialising schema/data pairs. At the moment Chris wants a way to serialise/deserialise a structure of strings into a structure of types based on the schema, not simple using the current system. Hopefully I'll have a proposal for this in the next week...  In the meantime I apologise for the roundabout way you're having to deal with this..

Tim


--
You received this message because you are subscribed to the Google Groups "ish.io" group.
To post to this group, send an email to is...@googlegroups.com.
To unsubscribe from this group, send email to ishio+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ishio?hl=en-GB.


Reply all
Reply to author
Forward
0 new messages