David Naseby wrote: > > I've been playing with the new FXScintilla widget in FXRuby 1.0.10, and I > think I've found a bug. I can't find a way to reproduce it in a short chunk > of code, but its to do with the line > @scintilla.getText(@scintilla.getTextLength) > > If I pass the result of that call to another object (my controller object, > in this case), I segfault with a "Cannot access memory at location" type > windows error. > > The workaround I'm using is > @scintilla.getText(@scintilla.getTextLength).dup > > The fact that this works might mean something to someone more wise than > myself. My environment is Win2k Pro, ruby 1.6.7 (2002-03-01) [i586-mswin32], > FXRuby 1.0.10 > > David Naseby Please try this workaround: len = @scintilla.getTextLength buffer = "".ljust(len) @scintilla.sendMessage(2182, len, buffer) The resulting string should be in the variable "buffer". HTH. _gilles.