[Haiku-commits] r21355 - in haiku/trunk: headers/os/interface src/kits/interface

Axel Dörfler axeld at pinc-software.de
Sat Jun 9 21:30:28 CEST 2007


Ingo Weinhold <bonefish at cs.tu-berlin.de> wrote:
> On 2007-06-09 at 19:19:03 [+0200], Axel Dörfler <axeld at pinc-software.de> 
> > wrote:
> > bonefish at BerliOS <bonefish at mail.berlios.de> wrote:
> > > * Avoided ugly multi-line strings in PrintToStream().
> > Do we need this method anyway? It's not part of libbe.so on BeOS, 
> > at
> > least, and I see little use in it (you'll never use it, because 
> > you're
> > never interested in that much information).
> I've never used the method, but admittedly I haven't worked much on 
> the 
> interface kit besides the adding the layout stuff. Apparently someone 
> found 
> it useful, though. Maybe it even was while getting the basics working 
> and 
> stopped being useful at some point. If no one speaks up, we can 
> safely 
> remove it, I guess.

IIRC Adi added it when the BView implementation started; even though I 
did much work on that class as well (later, though), I never used it 
myself (that's also why I didn't bother to reformat it :-))

> BTW, I'm generally not very fond of the PrintToStream() methods. I'd 
> rather 
> like to see a Java style "BString ToString()" or "void 
> ToString(BString&)" 
> method, or even a (non-member) "<<" BString operator.

Definitely agreed; even a PrintToStream(int fd) would be much better, 
but I like your suggestions better. The << has the disadvantage of not 
being able to access any private data - if that really is a 
disadvantage in this use case (probably not with any sane class).

Bye,
   Axel.




More information about the Haiku-commits mailing list