Thread Tools Display Modes
09-15-09, 01:38 PM   #1
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Hiding tables.

Is it possible to hide tables? i was just noticing that the minimap button for auctioneers enchantrix or informant are tables not frames.

would it be possible to hide the table just like a frame? IE if the table id is 1CF6A008

could i just do a
1CF6A008:Hide() ?
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-15-09, 01:46 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Frames are tables. They're just a table with a visual property. And, no, using that tableid won't work. Those are randomly assigned.

For example, in game do
/run print(UIParent)

You'll see the frame's tableid printed into chat. Reload the UI and do it again, and you'll get a different id.

/edit: see if those tables have names by doing :GetName() on them.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
09-15-09, 01:59 PM   #3
Tristanian
Andúril
Premium Member
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 279
In a nutshell, you can access and manipulate global tables by name but not locally created ones (due to lack of a proper reference).

Last but not least, you may access and manipulate frames, as long as they are named. If they aren't, things become more complicated, since you have to rely on hackery (for instance knowing their parent, etc), to get a reference to them.
__________________
  Reply With Quote
09-15-09, 02:00 PM   #4
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
not sure what you mean by /edit? and i did the table print but cant figure out what frame that table is actually attached to.... its not attached to the UIParent or the Minimap or the MinimapCluster frames
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-15-09, 03:01 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
GetMouseFocus() gets the reference to the frame under the mouse (the id).

GetMouseFocus():GetName() gets that frame's name (if it is named, and if that name is global).

GetMouseFocus():GetParent() will get a frame's parent's reference (id).

local frame = GetMouseFocus():GetParent()
frame:GetName() will get the parent frame's name.


If you want more of a basic understanding of what lua does and how it works: http://www.lua.org/pil/
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh


Last edited by Seerah : 09-15-09 at 03:04 PM.
  Reply With Quote
09-15-09, 05:08 PM   #6
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Hmm i know how to make that all function if i write an lua script for it and load it like an addon but whats unclear to me is exactly how you use that ingame? i tried /script and /console then variations of that but... im not getting any data back or at lest not the data i think i should be getting back. Gonna try to play with it again in a bit... out of like 30 minimap icons i have managed to hide all but two with my own code.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
09-15-09, 09:33 PM   #7
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Just look at the code for MinimapButtonBag to see how he's hiding them.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
09-15-09, 10:56 PM   #8
cloudwolf
A Black Drake
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 87
use /script print(GetMouseFocus():GetName()) running a script such as /scrip GetMouseFocus():GetName() will return the value but as you haven't actually told it to print that returned value it will not show you. It doesn't error it executed properly but you never asked it to show you the info.
  Reply With Quote
09-15-09, 11:24 PM   #9
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
With MBB and most minimap button addons they collect up the buttons and attempt to attach them to another frame. this would be an issue no mater what. i have a feeling that collecting that button is near impossible since it is a nameless table. certainly more trouble then its worth since the hide options in its own interface actually function proper.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Hiding tables.

Thread Tools
Display Modes

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