Message 1 of 3
"Unable to convert OK to type:Float" error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Here's a bit of code to make a checkbox in one object hide/unhide another object...
When I evaluate, I get the following error:
Any clues for the clueless here? Many thanks.
(
ca = attributes New
(
parameters main rollout:params
(
hidestuff type:#boolean ui:ckb_hs
)
rollout params "Checkbox Controller"
(
checkbox ckb_hs "Hide Unselected Stuff"
on ckb_hs changed theState do
(print this.hidestuff)
)
)
rollout demo "CustAtt Checkbox Demo"
(
button btn "Make Shapes"
on btn pressed do
(
s = sphere radius:12
c = cone pos:
custAttributes.add s ca
s.hidestuff = false
watcher = point()
watcher.parent = s
fs = float_script()
watcher.axistripod.controller = fs
fs.addNode "ctrlBall" s
fs.addNode "coneshape" c
fs.script = "with animate off (if ctrlBall.hidestuff == true then hide coneshape else unhide coneshape)"
)
)
createDialog demo 200 50
)
When I evaluate, I get the following error:
-- Runtime error: IScriptCtrl::SetExpression - Expression evaluation error:
-- Unable to convert: OK to type: Float
Any clues for the clueless here? Many thanks.