Added a function to create property setting functions.