<div dir="ltr">Hi,<br><br>I recently started a new project in order to learn FXRuby and to create something useful at the same time :) . It uses FXTable widget to display tables from database and other lists.<br>I implemented a ComboxBoxTableItem class in order to display lists and TextFieldTableItem to make it possible select part of cell contents while keeping it read-only.<br>
<br>Now when I start typing something in custom table item and then press Tab key without first pressing Enter in order to accept changes, application crashes with Segmentation Fault error.<br>I&#39;ve attached two screenshots and the code is below:<br>
<br>class ComboBoxTableItem &lt; FXTableItem<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; def initialize(text, tnsnames)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super(text)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @tnsnames=tnsnames<br>&nbsp;&nbsp; end<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; def getControlFor(table)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp=FXComboBox.new(table, 10, :opts=&gt;LAYOUT_FILL)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp.numVisible=10<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp.text=self.text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @tnsnames.each{ |item| drp.appendItem(item.to_s.upcase) }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp.currentItem=drp.findItem(self.text.upcase)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp.create<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drp<br>&nbsp;&nbsp; end<br>
&nbsp;&nbsp; <br>&nbsp;&nbsp; def setFromControl(control)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.text=control.text<br>&nbsp;&nbsp; end<br>end<br><br>Putting begin rescue around method bodies did not help.<br><br>Could you please, help me to find the problem and fix it?<br><br>
Thanks in advance,<br>Rovshan<br></div>