ScriptSpot

Forum topic · General Scripting

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

By general_knox · 2012-11-19

Description

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 (2)

general_knox · 2012-11-19

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 · 2012-11-19

instead of fnUpdateProgState(0) use

fnUpdateProgState 0 
--and
fnUpdateProgState 50