Mercurial > wow > ouroloot
diff AceGUIWidget-lib-st.lua @ 126:9232cacc9136 beta-mhg-4
lib-st notes and minor cosmetic cleanup; properly bump version from previous change
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Sun, 19 Aug 2012 22:00:59 -0400 |
parents | fd3dd12f96ce |
children |
line wrap: on
line diff
--- a/AceGUIWidget-lib-st.lua Sun Aug 19 21:08:59 2012 -0400 +++ b/AceGUIWidget-lib-st.lua Sun Aug 19 22:00:59 2012 -0400 @@ -26,7 +26,7 @@ Version 5 don't bogart the widget object -farmbuyer -------------------------------------------------------------------------------]] -local Type, Version = "lib-st", 4 +local Type, Version = "lib-st", 5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -77,9 +77,6 @@ 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 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 CreateST first" @@ -87,12 +84,10 @@ 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 - self.frame.customSetPoint = rawget(self.frame,"SetPoint") - self.frame.realSetPoint = self.frame.SetPoint - self.frame.SetPoint = ShiftingSetPoint - self.frame.SetAllPoints = ShiftingSetAllPoints - --end + self.frame.customSetPoint = rawget(self.frame,"SetPoint") + self.frame.realSetPoint = self.frame.SetPoint + self.frame.SetPoint = ShiftingSetPoint + self.frame.SetAllPoints = ShiftingSetAllPoints -- This needs the .frame field. This also unconditionally creates .obj -- inside that field and calls a SetScript on it as well.