<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">I pushed a fix to orocos.rb master. The
problem is the different behaviour of ruby1.8 and ruby1.9 in the
case of code blocks.<br>
In any case I strongly recommend using ruby1.9 for any gui and
syskit related work.<br>
<br>
Alex <br>
<br>
<br>
On 04/30/2013 10:42 AM, "Raúl Domínguez" wrote:<br>
</div>
<blockquote
cite="mid:301687405.46826.1367311362196.JavaMail.open-xchange@ox6.dfki.de"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div> I think that the problem is comming from the line </div>
<div> "headingSendButton.connect SIGNAL(:clicked),
PORT(:heading),:getter => g,:callback => c". </div>
<div> </div>
<div> The widget loads correctly and I get the data from the task
running on the robot (before too), but when I press the send
button in the widget, the widget crashes with the same error as
before. </div>
<div> </div>
<div>
<div> I corrected some parts of the script but I still get the
same error. Here is the current state of the script once
changed the connect_to for on_data. </div>
<div> </div>
<div> """ </div>
</div>
<div> require 'vizkit' <br>
<br>
Orocos::CORBA.name_service.ip = "seekurjr" <br>
Orocos.initialize <br>
<br>
# load GUI created with the Qt Designer <br>
widget = Vizkit.load "gui/heading.ui" <br>
widget.show <br>
<br>
# connect the widget with the task "simple_task" <br>
widget.connect_to_task "seekur_odometry" do |task| <br>
<br>
task.port("odometry_samples").on_data do |data| <br>
widget.orientationView.update(data,"odometry_samples") <br>
end <br>
<br>
end <br>
<br>
widget.connect_to_task "seekur_corridor_servoing" do |task| <br>
<br>
# generate a new sample each time the button is clicked <br>
# and show a message box if there is a connection error <br>
g = lambda{widget.headingSpinBox.value} <br>
c = lambda{|msg| Qt::MessageBox.warning(widget,"ComErr",msg)
if msg != "OK"} <br>
headingSendButton.connect SIGNAL(:clicked),
PORT(:heading),:getter => g,:callback => c <br>
<br>
# disable the GUI until the task is reachable <br>
task.on_reachable {widget.setEnabled(true)} <br>
task.on_unreachable {widget.setEnabled(false)} <br>
end <br>
<br>
#run qt main loop <br>
Vizkit.exec <br>
<br>
</div>
<div> """ </div>
<div> </div>
<div> </div>
<div> Have a nice day, </div>
<div> Raúl </div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Dipl.-Ing. Alexander Duda
Unterwasserrobotik
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 178-456620
Fax: +49 (0)421 178-454150
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:alexander.duda@dfki.de">alexander.duda@dfki.de</a>
Weitere Informationen: <a class="moz-txt-link-freetext" href="http://www.dfki.de/robotik">http://www.dfki.de/robotik</a>
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
</pre>
</body>
</html>