Possible bug? Gtk2::TextIter->forward_to_tag_toggle should take 'undef'?



Okay, it's been a long day and I'm settling down to do some relaxation
coding and I should really do a little more due diligence before
firing this one off, but...

I've got a Gtk2::TextBuffer that I've gotten from a textview with
"$textview->get_buffer()", and now I'm trying to iterate through it
tag by tag to put out something resembling XML. So I try:

   $nextiter->forward_to_tag_toggle(undef)

Because the devhelp docs for gtK_text_iter_forward_to_tag_toggle(...)
say:

   Moves forward to the next toggle (on or off) of the GtkTextTag tag,
   or to the next toggle of any tag if tag is NULL. If no matching tag
   toggles are found, returns FALSE, otherwise TRUE. Does not return
   toggles located at iter, only toggles after iter. Sets iter to the
   location of the toggle, or to the end of the buffer if no toggle is
   found.

But this results in:

*** unhandled exception in callback:
***   variable is not of type Gtk2::TextTag at /home/danlyke/Projects/xmledit/xmledit.pl line 46.

Again, apologies if I've flubbed this one in my weakened state, but
shouldn't it allow me an "undef" to find the next tag toggle of any
tag at all? P'r'aps I'll try to dig into the code tomorrow, but it
just ain't gonna happen tonight.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]