Preheat oven at 350. Spread coconut in a large baking pan and toast for 8 to 10 minutes in oven. Stir it 3 or 4 times so it toasts evenly. To make syrup, combine sugar, salt, corn syrup, margarine, and water in a 2 quart saucepan. Bring to a boil over medium heat, stirring until the sugar dissolves. Continue to boil gently until the mixture reaches 270 on a candy thermometer. Remove from heat and stir vanilla. Pour the syrup over warm popped corn, coconut and pineapple, and stir with a spoon until all kernels are coated. Shape like chocolate bars.