<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've attached two screenshots and the code is below:<br>
<br>class ComboBoxTableItem < FXTableItem<br> <br> def initialize(text, tnsnames)<br> super(text)<br> @tnsnames=tnsnames<br> end<br> <br> def getControlFor(table)<br> drp=FXComboBox.new(table, 10, :opts=>LAYOUT_FILL)<br>
drp.numVisible=10<br> drp.text=self.text <br> @tnsnames.each{ |item| drp.appendItem(item.to_s.upcase) }<br> drp.currentItem=drp.findItem(self.text.upcase)<br> drp.create<br> drp<br> end<br>
<br> def setFromControl(control)<br> self.text=control.text<br> 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>