View Single Post
11-24-09, 03:08 AM   #13
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by Torhal View Post
That does nothing for frames but clear their table members. The frame itself still exists, and will always exist until the UI is reloaded or you re-start WoW. Tables CAN be garbage-collected. Frames, though they are a special form of table, CANNOT.
So basicly the closest you can get is like this:
lua Code:
  1. local function deleteframe(f)
  2.     if not f.DeletedEvent then
  3.         f.DeletedEvent = f.OnEvent
  4.         f:Hide()
  5.         f.OnEvent = function() end
  6.     end
  7. end
  8.  
  9. local function restoreframe(f)
  10.     if f.DeletedEvent then
  11.         f:Show()
  12.         f.OnEvent = f.DeletedEvent
  13.         f.DeletedEvent  = nil
  14.     end
  15. end
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote