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

List:       koffice-devel
Subject:    Re: Wish 36485: Select all in KSpread
From:       Tomas Mecir <mecirt () gmail ! com>
Date:       2004-11-04 7:32:04
Message-ID: 492258b1041103233253a6e516 () mail ! gmail ! com
[Download RAW message or body]

On Wed, 3 Nov 2004 17:59:37 +0200, Inge Wallin <inge@lysator.liu.se> wrote:
> On Wednesday 03 November 2004 14.53, Tomas Mecir wrote:
> 
> > Well, KSpreadSheet::saveCellRect is what gets called. It will save
> > entire columns/rows if they are selected, so if you did the select-all
> > correctly (haven't seen toe code yet), things should work fine. I
> > don't really know why it crashes, but gdb is your friend ;)
> 
> The code was attached to my original mail. I think that part is correct. The
> problem doesn't manifest itself until I try to do something with the
> selection such as copying it to the clipboard or cutting it.  Also, the
> graphics indicates that things are OK.

Yup, your code is probably correct, but there is some bug or incorrect
assumption somewhere else, and it's probably making things go wrong
... No idea where though, I'm not all that familiar with that portion
of the code (yet) ...

> But I will try and run it in gdb and see what happens.  Btw, I have been doing
> my debugging by using "gdb .lib/kspread" since ./kspread is a shell script
> using libtool.  Is this the way I am supposed to work or is there a better
> way to invoke gdb?

Sounds correct. Alternately, invoking gdb kspread from some other
directory might work too. That would call /usr/bin/kspread. Just be
sure to always copy the libkspreadcommon.co library over to /usr/lib
(or whatever your KDE's prefix is) (or do make install), but you
surely already know that... ;)

> Those functions are trivial (only simple tests against 1 and KS_maxRow or
> KS_maxCol respectively). No problem there.

Hmm... Well, then something else must be the problem... We'll see what
gdd tells you. Alternately, putting in some calls to kdDebug (e.g.,
kdDebug() << "code ran past point X" << endl; ) might help you ...

> > Hm, all in all, I'm not quite convinced whether trying to implement
> > selecting of the whole sheet is a good idea at this point - the code
> > still has many problems with it...
> > I would recommend having a look at a thread called "KSpread tasks",
> > and/or at DESIGN.html in the sources, picking some nice thing and
> > implementing it.
> 
> I have looked at those files.  The problem with the things in there is that
> they all describe big tasks where you need intimate knowledge about the
> internals.  I don't have that.

Well it's not that hard to get the knowledge, you know ;) You don't
really need to know the details of every and each method in there to
be able to do something. At least, I certainly don't have such
knowledge ...

> There is also the issue of usability.  A big and featureful program with many
> small bugs is in many ways worse for the user than a smaller program that has
> few features but that actually works.  I am trying to make what is actually
> implemented already work as expected and to remove all the small unnecessary
> bugs that are reported into Bugzilla.  My main focus is not new features, but
> bug removal.

Exactly! I try to do the same thing. As you've surely noticed, all
those files I referred to don't describe new functionality, but rather
show ways how to make existing functionality more usable and/or
maintainable.

> True, the select all feature might be viewed as new functionality, but it is
> so important that I think that it actually is a bug that it isn't there.

Heh :) Okay, you may be right :) We certainly aren't implying that you
shouldn't be attempting to make it, or that it's not a useful thing -
just the limitations of the existing features (copy/paste in this
case) are making things kinda difficult.

But after thinking about it a bit more, maybe it's a good thing if we
have this select-all thing. Users with simple sheets will be happy, as
they probably won't hit the problematic part with these, and users
with more complex sheets will at least notice that there are problems,
and maybe some of them shall decide to help us solve them, who knows?
;)
Maybe unrealistical, but I can have dreams, can't I ? ;)

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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