View Single Post
02-06-23, 01:50 PM   #3
briskman3000
A Flamescale Wyrmkin
 
briskman3000's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 108
Originally Posted by Fizzlemizz View Post
Code:
cvrbutton:HookScript("OnClick", function() ShowColorPicker(cvred, cvgreen, cvblue, nil, myColorCallback) end)
The problem there is that you have to make sure that cvred, cvgreen, cvblue, and myColorCallback are all in scope or you'll just be passing nils
Those are all declared in the filespace above this, so they all are available for the code to use.

Wrapping ShowColorPicker in function() and end seemed to do the trick as the color picker now shows and sets the color when you pick one.
__________________
My Addons: Convert Ratings Honor Track
  Reply With Quote