Thread Tools Display Modes
09-23-13, 07:40 AM   #21
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by zork View Post
Maybe http://wowpedia.org/API_Slider_SetStepsPerPage, http://wowpedia.org/API_Slider_GetStepsPerPage causes a sort of endless loop? That are the only changes since 5.4 for slider object.

Getting an endless loop is easy. You set a value and on value set you call a function that sets a value. O_O

What will this do for you?
Lua Code:
  1. --If steps >= 1, the Slider's value will be changed by
  2. --exactly Slider:GetValueStep()*math.floor(steps) in the
  3. --direction of the click.
  4. slider:SetStepsPerPage(0) --disable SetStepsPerPage
  5.  
  6. --[[
  7. slider.SetStepsPerPage = function(...)
  8.   print(self:GetName().." called SetStepsPerPage")
  9.   print(...)
  10. end
  11.  
  12. slider.GetStepsPerPage = function(...)
  13.   print(self:GetName().." called GetStepsPerPage")
  14.   print(...)
  15. end
  16. ]]--

If your valuestep is very low (0.001 or lower) make sure to use bigger steps like: 1/valueStep
The SetStepsPerPage works fine. The real issue is this:

Critical Bugs

As of 17359, 'value step' property for Slider does not affect the thumb control. behaves as if value step was not set.

The lagg is also noticeable with a 0 - 3 slider wih 1 valuestep if the slider controls something massive like textures, models.
  Reply With Quote
09-30-13, 06:51 AM   #22
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Seems like this bug is also affecting color pickers, makes them ultimately laggy.
  Reply With Quote
09-30-13, 07:35 AM   #23
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Hmm. Do me a favor and test:
http://www.wowinterface.com/download...lorSmudge.html

I use a slider and 2 colorpickers in that. Do they lag for you aswell? Because I'm not experiencing any lags at all.

The template functions for slider and colorpicker are part of the example.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
09-30-13, 09:59 AM   #24
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by zork View Post
Hmm. Do me a favor and test:
http://www.wowinterface.com/download...lorSmudge.html

I use a slider and 2 colorpickers in that. Do they lag for you aswell? Because I'm not experiencing any lags at all.

The template functions for slider and colorpicker are part of the example.
It's highly depeds on what does the funcion colors, if its only coloring 2 boxes then i would say it's not relevant. The colorpickers seems smooth, the slider is laggy for me. However CPU debuging while you picking colors than you can see the addon using 0.25% cpu time and 10% memory usage in peaks.

But if you print out the colors from the picker:

Lua Code:
  1. function frame:UpdateColor()
  2.     print(self.colorA.r, self.colorA.g, self.colorA.b)

You can see the color picker want to save the colors in more precisely then there are colors in the whole universe.

But here is an Ace3 based color picker coloring a simple texture:


Last edited by Resike : 09-30-13 at 10:12 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Slider problems


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