-- Unknown property: "value" in undefined (SOLVED)

Hi,

I wrote 2 functions:

fn fnUpdateProgState iAmount =
(
pProgressBar_prog.value = iAmount
)

fn fnClearChannelInfo =
(
fnUpdateProgState(0)
channelInfo.ClearChannel $ -2
fnUpdateProgState(50)
)
When I call fnClearChannelInfo(), I get this error:
-- Unknown property: "value" in undefined

The pProgressBar_prog progressbar is inside a rollout (progressbar pProgressBar_prog color: [140,88,225])

Do I have to declare something global? Im not sure how to fix this!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
general_knox's picture

Ah ok I found the problem: I

Ah ok I found the problem:

I had to make the rollout global and then add it as a prefix to the progressbar name, like this:

global rRollout
fn fnUpdateProgState iAmount =
(
rRollout.pProgressBar_prog.value = iAmount
)

barigazy's picture

instead of

instead of fnUpdateProgState(0) use

fnUpdateProgState 0 
--and
fnUpdateProgState 50

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.