[fxruby-users] table.extractText problem

Lyle Johnson lyle.johnson at gmail.com
Tue Oct 23 19:12:58 EDT 2007


On Oct 23, 2007, at 3:03 PM, Björn Bergqvist wrote:

> I tried to use the FXTable::extractText like this
>
>      maxrow = MAX_ROW - 1
>       maxcol = MAX_COL - 1
>       printout = @table.extractText(0 , maxrow , 0 , maxcol ,  
> cs="\t", rs="\n")
>       #  Write the file
>       File.open(saveDialog.filename, "w").write(printout)
>
> then I got this output:

<snip>

Well, I don't know what the values of MAX_ROW and MAX_COL are (as  
compared to the table size), so I don't know if that's part of the  
problem or not. But I just make a quick modification to the standard  
table.rb example program to include a call to extractText():

     extract = FXMenuCommand.new(filemenu, "Extract text")
     extract.connect(SEL_COMMAND) do
       result = @table.extractText(0, @table.numRows - 1, 0,  
@table.numColumns - 1)
       puts result
     end

and this works as expected. Note that I used the default values for  
the last two arguments, but that shouldn't make a difference. If  
you're still having problems, please file a bug report and attach a  
short example program that demonstrates the problem.

Thanks,

Lyle


More information about the fxruby-users mailing list