Notifications
Clear all

[Closed] Using on changed event with a controller

Hi,
i’m having a problem when using the “on change” event when the spinner is linked with a controller.
In the code below in one hand if i move the spinner the position of the $ball changes and the “on change” event triggers but on the other hand if i move the $ball the spinner changes but the “on change” event does not trigger.
Any idea of how to solve it?

rollout qqq_rollout “”
(
spinner qqq_spinnerX “” range:[0,1000,1]
controller:$ball.controller.position.controller.Position_XYZ.X_Position.controller

on qqq_spinnerX changed arg do
(
	print arg
)

)
createDialog qqq_rollout

2 Replies
 JHN

To me it looks like a safety precaution that it doesn’t trigger the handler. What happens if the event handler influences the controller, and the controller in turn influences the handler, looks like infinite loops to me. I think there’s no way to use it like that. You’ll have to come up with something else for what you want.

Maybe if you tell want you want to accomplish by this?

-Johan

Hi,
thanks for the answer.
What i’m trying to do is to link an object to the $ball when the $ball moves but if the $ball is static i want to to break that link.
Any ideas of how to manage to do that without using callbacks?