Thread Tools Display Modes
09-17-10, 09:14 PM   #1
Tiok
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 2
Unlisted StatusBar Changes?

One of the basic widget types is the StatusBar (like the experience bar, fills from left to right).

In an addon, I create a StatusBar in the XML like this:

Code:
 <StatusBar name="MyStatusBar" drawLayer="ARTWORK" minValue="0" maxValue="100" defaultValue="50">
     ...
</StatusBar>
Now from the LUA I access the StatusBar thusly:

Code:
MyStatusBar:GetValue()
And it returns a zero, even though the defaultValue was set to 50.

In addition, I can literally do this:

Code:
MyStatusBar:SetValue(50)
MyStatusBar:GetValue()
And it still returns a zero.

... (edited) ...

After a lot of testing, it turns out that the minValue and maxValue set in the XML are being ignored. It works perfectly fine if you call SetMinMaxValue(0,100) from Lua somewhere. Still, any clue what broke this, or why?

Last edited by Tiok : 09-17-10 at 10:12 PM.
 
09-18-10, 05:20 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Not sure, may be a bug they will fix. Or perhaps they want LUA to set these attributes now, also I saw you edited and I saw you figured the MinMaxValue thingy I was going to suggest.

Last edited by Vlad : 09-18-10 at 05:27 AM.
 
09-20-10, 06:19 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Maybe they had default values for min/max that got removed, thus you need to set them now yourself. min/max could be anything.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
 

WoWInterface » AddOns, Compilations, Macros » Cataclysm Beta » Unlisted StatusBar Changes?

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