I have an app where users can set a canvan backgroud color using a color picker. This works just fine as long as the user going in and sets the color. If they don't set the color then my canvan has not backgroundn color. On my color picker I have a default color set.
My question is how can I grab the default color of the color picker when the app loads and apply it to the canvas?
Here is what I have so far. In my WindowedApplication a doCreationComplete function kicks off.
I set this to Bindable and set up the variable.
Amongst other thinks, I set the riderOneColor to the selected color when the app loads.
Then my canvas is set to that variable.
So my thougth when the app loads I go out and get the colorPickerOne.selectedColor and assign it to the var riderOneColor. Then bind that var to the canvas. But that doesn't work. I get the following error.
1067: Implicit coercion of a value of type String to an unrelated type uint.
I am thinking that it has something to do with the hex conversion of the color perhaps? I tried int instead of Sting on the riderOneColor but not luck.
I forgot to mention that I am using states. So the issue is that the settings state has not been displayed/drawn yet. So in fact I cannot get the colorPickerOne.selectedColor.
I decided to use ShareObject to get and set these variables. This will make them persistant and settings will be saved/loaded on exit/start of the app.
No need to reply. I answered my own quesions.