Sweet and Sour Sauce: To make the sweet and sour sauce combine in a small saucepan the tomato sauce, sugar, vinegar, sherry and soy sauce.
Mix the cornflour with the water then add to the saucepan as well. Bring the mixture to a soft boil and let simmer for a minute or until thickened and clear looking. Taste. Adjust sugar/vinegar/soy sauce to your liking.
Stir Fry: In a wok or large saucepan add the oil and heat over medium high heat. Add the tofu, onion and capsicum the fry until tofu is lightly browned and all the vegetables are cooked through.
Add the pineapple. Fry until heated through.
Add the sweet and sour sauce. Stir to mix well. Serve immediately with rice.