[haiku-development] Re: Using the Flatten() function

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 1 Aug 2009 11:34:30 -0700

On Sat, Aug 01, 2009 at 10:09:23PM +1200, Yashasvi A.C. wrote:
> Hi,
> 
> Thanks for the explanation guys. I understand how it works now. We have a
> BFile created, which is then used in the Flatten() function as it a BDateIO
> object.
> 
> So, what I have done is the following excerpt:
> .....
> BFile stream = BFile("/home/yash/...../Message", B_CREATE_FILE |
> B_ERASE_FILE | B_WRITE_ONLY);
> message -> Flatten(&stream);
> ....
>  [....]
> 
> On running the code, the messages are displayed (in the console using a
> println function), but on opening the Message file, nothing is present in
> it. Am I missing something here?

Your 'flatten' program wasn't still running when you checked the file,
was it?  You probably wouldn't see anything in it until it was actually
closed (which you don't mention doing...)

                        -- Pete --


Other related posts: