In a medium skillet saut the onions in the olive oil until tender, about 10 minutes.
Remove from the heat and transfer to a small bowl.
Let cool.
Preheat the oven to 400°F. Have the onions, cubed cheese, and melted butter in front of you.
Place the 8 sheets of filo in front of you, cover them with a sheet of wax paper, then cover the wax paper with a damp towel to prevent the dough from drying out. Return any remaining filo to the refrigerator well wrapped.
Remove 1 sheet of filo from the stack, cover the stack again, and with a pastry brush lightly brush the surface of the dough with melted butter.
Place a second sheet of filo on top.
Brush it lightly with butter, making sure to get the edges. (Always keep the remaining stack of filo covered.)
Using the tip of a pointed knife cut the buttered sheets of filo into 3 even lengthwise strips.
Place not more than 1 tablespoon each of the cubed cheese and sauted onion near the corner of 1 strip. Gently fold this corner to make a triangle, covering the filling, and continue to fold the triangle as you would a flag, that is, folding the triangle in half in such a way that the triangular shape is maintained.
Repeat steps 3, 4, and 5 until the 8 sheets of filo have been used. You should have 12 triangles. May be prepared to this point up to 8 hours in advance, covered, and refrigerated.
Bake for 15 minutes, or until golden all over. (To freeze uncooked triangles, place them in the freezer uncovered on a platter.
Once frozen, remove them from the platter, wrap them in plastic or foil, and return to freezer.
Do not defrost before baking.)