Mercurial > wow > ouroloot
diff AceGUIWidget-lib-st.lua @ 49:fd3dd12f96ce
Handle text generation modules being LoadOnDemand. lib-st widget to v5 to fix handling multiple live ST instances.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Sun, 29 Jan 2012 03:38:30 +0000 |
parents | 1070a14cfee4 |
children | 9232cacc9136 |
line wrap: on
line diff
--- a/AceGUIWidget-lib-st.lua Sat Jan 28 23:36:23 2012 +0000 +++ b/AceGUIWidget-lib-st.lua Sun Jan 29 03:38:30 2012 +0000 @@ -23,6 +23,7 @@ Version 2 reshuffle to follow new AceGUI widget coding style Version 3 add .tail_offset, defaulting to same absolute value as .head_offset Version 4 restore original frame methods, as fortold by ancient prophecy +Version 5 don't bogart the widget object -farmbuyer -------------------------------------------------------------------------------]] local Type, Version = "lib-st", 4 @@ -76,22 +77,22 @@ if not st.frame then error"lib-st instance has no '.frame' field... wtf did you pass to this function?" end - if st.frame.obj and (st.frame.obj ~= self) then - error"lib-st instance already has an '.obj' field from a different widget, cannot use with AceGUI!" - end + --if st.frame.obj and (st.frame.obj ~= self) then + -- error"lib-st instance already has an '.obj' field from a different widget, cannot use with AceGUI!" + --end self.st = st if not st.head then - error"lib-st instance has no '.head' field, must use either ScrollingTable:CreateST or this widget's CreatST first" + error"lib-st instance has no '.head' field, must use either ScrollingTable:CreateST or this widget's CreateST first" end self.frame = st.frame -- gutsy, but looks doable -- Possibly have already wrapped this ST in a previous widget, careful. - if st.frame.obj ~= self then + --if st.frame.obj ~= self then self.frame.customSetPoint = rawget(self.frame,"SetPoint") self.frame.realSetPoint = self.frame.SetPoint self.frame.SetPoint = ShiftingSetPoint self.frame.SetAllPoints = ShiftingSetAllPoints - end + --end -- This needs the .frame field. This also unconditionally creates .obj -- inside that field and calls a SetScript on it as well.