[kde-edu]: kig: trace of a point and macro argument prompts

Maurizio Paolini paolini at dmf.unicatt.it
Tue Jan 24 16:52:25 CET 2006


On Tue, Jan 24, 2006 at 04:07:36PM +0100, Davide G. M. Salvetti wrote:
> I known some XML, so I actually noticed the point you're calling
> attention to.  However, it didn't work for me (kig 3.5.0, from Debian
> 4:3.5.0-4).[...]

Your .kigt file does not contain errors! What happens is that for
some reason the information in "UseText" and "SelectStatement" is
lost when loading from a kigt file or when saving in the "macros.kigt".
I tried to manually readd such information directly in the "macros.kigt"
(you can find that file in your ".kde/share/apps/kig/kig-types/macros.kigt")
and in this way it worked.  I recommend to save the previous "macros.kigt"
in case something goes wrong!
Oops... I just found out that this only works the very *first* time you
use kig.  The point is that "macros.kigt" is probably rewritten every time
kig is run;  I cannot think of a simple way out the problem (short of
rewriting the file every time upon kig startup.

I will have a look at the source code of kig and try to fix the problem.

> That's fine, thanks!  Do you also plan to have debs?  (As my email
> address suggests, I'm actually a Debian user.)

Maybe... I cannot promise that because I personally do not have 
experience with creation of deb packages.  I will ask to a colleage.

> I'd like to add another question (actually a wishlist request, I think):
> 
>   - Is it possible to have kig replay the history of a given
>     construction?  I mean, some window where the user can press "Back"
>     and "Next" buttons to see the whole construction replayed, while an
>     informative string (such as "segment between A and B") is displayed
>     in the status line?  Actually, one can sue Undo and Redo, but they
>     miss the informative string.  I think it would be nice also to have
>     the possibility of printing a given construction in plain English (a
>     sort of parser of what is recorded in a .kig file, like: "step 1:
>     build a circle centered in O of radius OA; step 2: build a circle
>     centered in A of radius OA; ..."); a student could use this to let
>     the teacher know what she did to solve a home assignment (for
>     example).

Actually the Undo/Redo buttons have a short tooltip that writes something
(add a point/remove a point/...) but of course this isn't enough.  Your
suggestion would be a nice addition, although not so easy to implement,
I am afraid... 

In recent versions of kig we added some sort of "reverse" of your wish,
namely the ability to describe a kig construction using the "python"
language.  This must be done outside kig using any text editor to produce
a file *.kpy, (an example follows), then you execute it with the
python script "pykig.py".

------------ baricentro.kpy ---------------
# tre punti
a=Point(-2, 1)
b=Point(-1, -1)
c=Point(1, 1)

# triangolo
l1=Segment(a, b)
l2=Segment(b, c)
l3=Segment(c, a)

# punti medi dei lati
# primo metodo:
p1=MidPoint(l1, internal=True)
# altro metodo:
p2=l2.midpoint(internal=True)
p3=l3.midpoint(internal=True)

# mediane
# primo metodo
m1=Line(c, p1)
m2=Line(a, p2)
m3=Line(b, p3)

# baricentro
baricentro=LineLineIntersection(m1, m2, width=10, color="#ff66aa")
-----------------------------------------

Just to have your wishes recorded somewhere, you could file a
"bug" (bugs.kde.org).  Wishes are allowed!

Have you any programming experience? Did you ever considered
the possibility to help with the development of kig?

Cheers,
Maurizio


More information about the kde-edu mailing list