In a sauce pan, cook the onion in butter until it is tender.
In a small bowl, combine cornstarch and milk. Add the milk mixture to the onions. Cook over a medium flame until it begins to boil, stirring regularly. Remove from heat and stir in spices.
Place a third of the sweet potatoes in a large greased casserole dish. Then top with a 1/2 cup of diced ham:
Cover with a third of the sauce:
Repeat the layers.
Bake, covered at 350 F for 40 minutes. Uncover; bake for an additional 30 minutes or until the potatoes are tender. Let stand for 5 minutes before serving.
The top layer of sweet potatoes are slightly crisp while the under-layers are tender.