[fxruby-users] table.extractText problem
Björn Bergqvist
bjorn.bergqvist at gmail.com
Wed Oct 24 11:25:23 EDT 2007
Hello,
I did the modification and then I get:
*** glibc detected *** ruby: double free or corruption (!prev): 0x08260bb0 ***
Will file a bug report as soon as I find some time.
any value higher than: result = @table.extractText(0, 11, 0, 6)
will result in a crash like:
*** glibc detected *** ruby: malloc(): memory corruption: 0x08169000 ***
on my system. Maybe a gcc problem?
Regards
Bjorn Bergqvist
http://www.discretizer.org
2007/10/24, Lyle Johnson <lyle.johnson at gmail.com>:
>
> 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
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table.rb
Type: application/x-ruby
Size: 6992 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20071024/74e54baf/attachment-0001.bin
More information about the fxruby-users
mailing list