# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1327808061 0 # Node ID f9613ef500ad23d4e534e7f74f559a912867eb26 # Parent c2e4ad7fa4583e70568431f6cd579277bdb18362 AceGUIWidget-lib-st.lua to v5 for safety. diff -r c2e4ad7fa458 -r f9613ef500ad AceGUIWidget-lib-st.lua --- 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.