1

This may sound like a very obvious question but I am using the OnShow script handler for a frame and it seems to take effect when the frame Loads as well as when it shows so I do not understand why I should ever need to use OnLoad for a frame. It shows when it loads and it loads before it shows but does that really matter?

Is there some sort of major distinction between the two that I am unaware of?

d33tah
  • 10,999
  • 13
  • 68
  • 158
Mayron
  • 2,146
  • 4
  • 25
  • 51

1 Answers1

2

OnShow is called, when the frame becomes visisble. A frame can be created without being visible. Thus, OnShow won't be called. OnLoad will be, on the other hand.

OnLoad is called, as the frame gets created - Not visible, as above.

Sources:

http://wowprogramming.com/docs/scripts/OnShow
http://wowprogramming.com/docs/scripts/OnLoad

Frederik Spang
  • 3,379
  • 1
  • 25
  • 43