Line and grease a 21cm square cake pan. Cream butter and sugar until light and fluffy. Add vanilla essence. Beat in eggs one at a time. Add 1 tbsp flour if mixture begins to curdle.
Stir in grated apples. Fold in sifted flour and mix in walnuts, sultanas and pineapple. Blend well.
Spoon mixture into prepared pan. Bake in a preheated oven at 180 ºC for one hour or until a skewer inserted into the centre of the cake comes out dry. Cool in the pan for five minutes before turning out onto a wire rack.