[Rock-dev] Problem with connect to

Sylvain Joyeux sylvain.joyeux at dfki.de
Mon Apr 29 18:25:16 CEST 2013


On 04/29/2013 06:22 PM, Sylvain Joyeux wrote:
> On 04/29/2013 05:27 PM, Alexander Duda wrote:
>> Have a look at
>> http://www.rock-robotics.org/master/documentation/graphical_user_interface/200_simple_gui.html
>> for an overview how to use the async API.
>>
>> In the particular case use either
>>
>> task.port("odometry_samples").on_data do |data|
>>      widget.orientationView.update(data,"odometry_samples")
>> end
>>
>> or the connect logic:
>> l = lambda do |sample|
>>      widget.orientationView.update(sample,"odometry_samples")
>> end
>> connect PORT(:odometry_samples),l
> Couldn't we then implement #connect_to(&block) by calling the connect
> logic, i.e.
>
>     def connect_to(&block)
>         task.connect(task.PORT(name), block)
>     end
Forget about my comment ... connect_to(&block) was an old vizkit thing, 
it is now replaced by on_data, is that right ?

Sylvain


More information about the Rock-dev mailing list