I'm getting a warning message from Cobra which I don't understand and can't seem to get rid of. The warning is about the 'delete' method on the buffer of a Gtk.TextView:
# @args -pkg:gtk-sharp-2.0 # uncomment this
use Gtk
class MainWindow
def main
text = TextView()
text.buffer.delete(text.buffer.startIter, text.buffer.endIter)
The warning message when compiling the above is:
- Code: Select all
$ cobra -c textview.cobra
textview.cobra(8): warning: "Gtk.TextBuffer.Delete(Gtk.TextIter, Gtk.TextIter)" is obsolete: "Replaced by "ref TextIter, ref TextIter" overload"
Compilation succeeded - 1 warning
If I use '@help text.buffer' to list all the available methods (a great facility, by the way!), I find only one 'delete' method, with signature: def delete(start as inout TextIter, end as inout TextIter)
Any ideas as to how to get rid of the warning? (Apart from the warning, the method seems to work as intended.)