a Trait's trait_set method

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

a Trait's trait_set method

_jelle_
This post has NOT been accepted by the mailing list yet.
Hi,

I'm bumping into the following for my traits based robot programming
 software:

An industrial robot has 6 joints. In order to make it move linearly you'll
use all of these joints. Now, in my traits app, I have both linear and
 joint sliders. The joint sliders are updated ( all 6 of them ) when one of the
 3 linear ( x, y, z) sliders changes value.

The tricky bit is this: when a slider from either set ( say linear ) changes value
so does the other set ( joint sliders in this case ).

I'm doing this in a horrendous way...
I use the trait_set method, to update the sliders of the other set.
The problem is that this generates unwanted events which are simple
 ignored ( this is the ugly bit ).

The trait_set method has an argument which set to "trait_change_notify=False"
 will update the values of the traits by passing a dict - but -
the GUI's sliders are then not updated.

Is there a way to sync the GUI's sliders, but not trigger the traits events?

Thanks,

-jelle