View Single Post
04-14-09, 05:04 PM   #41
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
Totally depends on your design. If you already have the frames for display, and the related events/handlers are simple, it's probably best to assign them directly to the frame and make good use of self. If you don't have the frames, a central dispater is fine if you write it well. You can make a dispatcher in a single line of code that works wonderfully...

f:SetScript("OnEvent", function(self, event, ...) if self[event] then return self[event](self, event, ...) end end)
  Reply With Quote