|
||||||
| AddOn HELP! Requests for assistance and misc bug reports go here. | ||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Dec 2008
Posts: 27
|
Hey everybody,
for my addon VendorSearch, I come with a solution or searching, and it's so hide the Items' frame if it's not matching the keyword you're looking for. Technically, it works. But I still have a problem when I want to get the frame name and to Hide() it. Here is the code : PHP Code:
but it's basically the equivalent of something like that, that I want : /script MerchantItem2:Hide() and that works.... All I can't get is the number after the frame name.... Thanks for your help !
__________________
VendorSearch : Creates a search bar to search through a vendor's items ! You are now able to find much faster the item you want, in a cleaned Vendor frame. Last edited by adriweb; 01-09-2009 at 02:30 AM. Reason: better now |
|
|
|
|
|
#2 |
|
Hero Member
Join Date: Aug 2008
Posts: 798
|
CreateFrame(...) creates a new frame and then you hide it or show it. I guess thats wrong.
You need to get the frame somehow. _G["MerchantItem"..i]:Hide() should work. |
|
|
|
|
|
#3 | |
|
Member
Join Date: Dec 2008
Posts: 27
|
Thanks !
actually, I found a way just before to see your answer : Quote:
__________________
VendorSearch : Creates a search bar to search through a vendor's items ! You are now able to find much faster the item you want, in a cleaned Vendor frame. |
|
|
|
|
|
|
#4 | |
|
Hero Member
Join Date: Aug 2008
Posts: 798
|
Quote:
I think many developers do: Code:
local G = _G ...code... local frame = G["FrameName"] ... |
|
|
|
|
|
|
#5 |
|
Member
Join Date: Dec 2008
Posts: 27
|
well, that sounds interesting,
thanks
__________________
VendorSearch : Creates a search bar to search through a vendor's items ! You are now able to find much faster the item you want, in a cleaned Vendor frame. |
|
|
|
|
|
#6 |
|
Seal Cub Clubbing Club
Join Date: May 2005
Location: California, US
Posts: 7,760
|
getglobal is just a useless function wrapper to _G. Basically, getglobal is this:
function getglobal(x) return _G[x] end |
|
|
|
![]() |
| Tags |
| concatenate, frame, item, merchant, merchantitem |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 02:03 PM.
WowAce Forums






