[haiku-bugs] [Haiku] #11132: BTextView::GetText is broken

  • From: "waddlesplash" <trac@xxxxxxxxxxxx>
  • Date: Thu, 14 Aug 2014 20:29:59 -0000

#11132: BTextView::GetText is broken
--------------------------------+------------------------------
 Reporter:  waddlesplash        |        Owner:  axeld
     Type:  bug                 |       Status:  new
 Priority:  normal              |    Milestone:  R1
Component:  Kits/Interface Kit  |      Version:  R1/Development
 Keywords:                      |   Blocked By:
 Blocking:                      |  Has a Patch:  0
 Platform:  All                 |
--------------------------------+------------------------------
 Calling {{{Text();}}} works as expected -- you get a {{{char*}}} with all
 the text in the view. But calling {{{GetText(buffer,
 BTextView::TextLength());}}} produces the same output only if the text was
 not modified since {{{SetText}}} was called. If it was modified,
 {{{buffer}}} will not contain the text the view shows, but rather the text
 '''''as if the user had written it while in overwrite mode''''' meaning
 the {{{GetText()}}} buffer will be filled only up to the size of whatever
 was passed to {{{SetText}}} as well as being erroneous.

 A few OpenGrok searches show that nothing internal uses this, but it
 appears that at least some apps on HaikuArchives does...

--
Ticket URL: <https://dev.haiku-os.org/ticket/11132>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: