[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KOffice Lib/KDE/Qt Questions
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-11-23 13:03:35
[Download RAW message or body]

On Friday 23 November 2001 07:40, Clarence Dang wrote:
> Sorry about the delayed response :( ...
> 
> On Tue, 13 Nov 2001 22:19, David Faure wrote:
> > On Tuesday 13 November 2001 10:54, Clarence Dang wrote:
> > > Hello...
> > >
> > > As you may be aware, I'm developing an import fitler for KWord but I am
> > > completely new to KOffice, Linux and KDE.  So I was wondering if anyone
> > > would be able to please answer some of my questions below:
> > >
> > > 1. It seems that I cannot call "bool KoStore::write( const char* _data,
> > > unsigned long _len )" more than once.  I thought that it would have acted
> > > a bit like fwrite where you can call it more than once.  I mean, if I
> > > can't call it more than once, I would have to accumulate all my output
> > > into one huge string and then call KoStore::write at the end.  Isn't this
> > > hopelessly inefficient?
> >
> > You should be able to call write() more than once, there's no reason why
> > not. About the efficiency and the buffering... well, when writing, KoStore
> > has to buffer the data anyway :(. Can't be fixed until we ditch tar.gz and
> > go for something like zip - reason: the tar format requires to write down
> > the size of the data before writing the actual data...
> > So what's happening exactly ? Do you get any error... ?
> 
> write () returns a different value (false ???) the second time it's called 
> and doesn't seem to write anything at all.

Yes, but does anything appear in the debug output, in the console where
you start kword ? Much code is calling write() more than once, so the problem
has to be more subtle than that (and I would guess, not in KoStore).

> > > 4. With kdDebug() and friends, how do I "register" a debug area with KDE
> > > i.e. so that I can call kdDebug(mydebugarea) for my particular filter
> > > (mswrite)?
> >
> > Adding the entry to kdelibs/kdecore/kdebug.areas.
> 
> How do I do this "officially" so that I don't steal some other new 
> developer's number and so that everyone else knows my number?  Because the 
> filter is reaching "maturity", so I guess I'll have to do this soon.

There is only one kdelibs/kdecore/kdebug.areas, so as soon as you commit it,
everyone else will know your number ;)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic