Mercurial > wow > whichrankdoeswhat
diff AceGUIWidget-lib-st.lua @ 11:f9613ef500ad
AceGUIWidget-lib-st.lua to v5 for safety.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Sun, 29 Jan 2012 03:34:21 +0000 |
| parents | c2e4ad7fa458 |
| children |
line wrap: on
line diff
--- a/AceGUIWidget-lib-st.lua Sat Jan 28 17:46:44 2012 +0000 +++ b/AceGUIWidget-lib-st.lua Sun Jan 29 03:34:21 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.
