preferences:set-un/marshall in Framework Functions
(preferences:set-un/marshall-> void?symbolmarshallunmarshall)
symbol: symbol?
marshall: (any/c . -> . printable/c)
unmarshall: (printable/c . -> . any/c)preference:set-un/marshallis used to specify marshalling and unmarshalling functions for the preferencesymbol.marshallwill be called when the users saves their preferences to turn the preference value forsymbolinto a printable value.unmarshallwill be called when the user's preferences are read from the file to transform the printable value into it's internal representation. Ifpreference:set-un/marshallis never called for a particular preference, the values of that preference are assumed to be printable.If the unmarshalling function returns a value that does not meet the guard passed to
preferences:set-defaultfor this preference, the default value is used.The
marshallfunction might be called with any value returned fromand it must not raise an error (although it can return arbitrary results if it gets bad input). This might happen when the preferences file becomes corrupted, or is edited by hand.readpreference:set-un/marshallmust be called before callingpreferences:get,preferences:set.