Thread Tools Display Modes
05/31/14, 04:02 PM   #1
hulksmash
 
hulksmash's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 30
Remove Control

What is the opposite to CreateControl? I want to remove a control window (which is a row) and redraw all my rows.
  Reply With Quote
05/31/14, 04:08 PM   #2
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
There is not an option to remove controls. The only way is to keep track of the controls you create and show/hide depending on the need.
  Reply With Quote
05/31/14, 04:37 PM   #3
hulksmash
 
hulksmash's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 30
killing me
  Reply With Quote
05/31/14, 06:00 PM   #4
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 161
Yep I dont get that either why there is no such thing.

That means - never create to many controls and always reuse your old ones.
  Reply With Quote
05/31/14, 06:37 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Because controls are just specialized tables. Once you create a table or control it sits in memory. If you remove all reference to it, it'll eventually be picked up by the garbage collector.

As always, the smartest thing to do is only create things when you need them, and reuse as much as possible. The three R's go very well with this.

Reduce - Reuse - Recycle

  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Remove Control


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off