Thread: Event Chaining
View Single Post
04/14/14, 02:12 PM   #3
Wukar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 27
Thanks for the examples. The OnMouseUp, kills the default operation, OnClicked is ignored. Maybe there's just something wrong with my event handler assignment:

lua Code:
  1. local function BBS_GetActiveTabs(tabControl)
  2.     local children = {}
  3.     local counter = tabControl:GetNumChildren()
  4.     for i=1, counter do
  5.         local child = tabControl:GetChild(i)
  6.        
  7.         if (child:GetType() == CT_CONTROL) then
  8.             -- add a handler for each control
  9.             -- TODO: add one handler to the parent and handle tab changes
  10.             child:SetHandler("OnClicked", function(self)
  11.                 BBS_SearchBoxOnTextChanged(bbs.editbox)
  12.             end)
  13.             children[i] = child
  14.         end
  15.     end
  16.     return children
  17. end
  Reply With Quote