While the built-in
SC.DateTime, will cover almost all the different types of attributes in your records. If you wish to create a reusable custom transform, this is easily done using
For instance, SproutCore provides a class for manipulating colors called
SC.Color. If we were sending and receiving a lot of color information to and from a remote data source, it would be nice to add a custom transform so that we could use a color string in the data hash for communicating with the server, but use an
SC.Color object in the record for use in the application.
To do this, we would register our own ...