Message 1 of 4
pickbutton in CustAttribute UI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've run into a bit of a syntatical problem. The idea here is that a box is created with a pickbutton as a custAtt UI. With the pickbutton pressed, any object selected will align with the box's y-position. Here's what I've got:
The above code throws the following error: -- Type error: Assign needs controller, got: float_script
Any guidance on where I screwed up? Many thanks.
(
ca = attributes new
(
parameters main rollout:params
(
custLink type:#node ui:pbt_cl
)
rollout params "Pickbutton Test"
(
local targ
pickbutton pbt_cl "Custom Connect"
on pbt_cl picked obj do
(targ = obj)
)
)
rollout test "pbt test"
(
button btn "Make Box"
on btn pressed do
(
b = box()
custAttributes.add b ca
holder = point()
holder.parent = b
fs = float_script
holder.position.x_position.controller = fs
fs.addNode "this" b
fs.addNode "picked" targ
fs.script = "with animate off (picked.pos.y = this.parent.pos.y)"
)
)
createDialog test 200 50
)
The above code throws the following error: -- Type error: Assign needs controller, got: float_script
Any guidance on where I screwed up? Many thanks.