Re: [tablix-list] Freelesson module

From: Nicholas Robinson <nprREMOVE@THISbottlehall.co.uk>
Date: Mon Jun 06 2005 - 22:27:53 CEST

Hi Tomaz

Thanks for your help, I now have a working module!

Attached is the code and a sample config file.

Best Wishes

Nick

On Monday 06 June 2005 16:23, Tomaz Solc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> > The example in the documentation uses a handler to remove the resources
> > from the domains. Because I'm using precalc, I can't use the supplied
> > tuple parameter to get at the domain. So I'm using dat_domains which I
> > then traverse until I find the one for resource type "time".
>
> Don't use dat_domains directly. Use dat_tuplemap. It is an array of
> tupleinfo structures (just like the "tuple" parameter for the
> restriction handler) for all tuples.
>
> > I then create an array of the values I wish to retain and call
> > domain_and. This seems to work, except when I run with debug I get:
> >
> > [4006a] kernel: compact_domains: 12 tuples in 0
> > [4006a] kernel: compact_domains: 1 tuples in 1
> > [4006a] kernel: compact_domains: 12 tuples in 2
> > [4006a] kernel: compact_domains: 12 tuples in 3
> > [4006a] kernel: compact_domains: 11 tuples in 4
> >
> > instead of the usual:
> >
> > [xxxxx] kernel: compact_domains: 12 tuples in 0
> > [xxxxx] kernel: compact_domains: 12 tuples in 1
> > [xxxxx] kernel: compact_domains: 12 tuples in 2
> > [xxxxx] kernel: compact_domains: 12 tuples in 3
> >
> > I get the extra domain with these specific values for tuples whether I
> > remove 1,2 or 3 lessons.
>
> If "time" domains for all tuples aren't equal (if they don't contain the
> same times lots) then compact_domains() will leave more than one time
> domain. This is OK. Have a look at compact_domains() documentation.
>
> > When I look at the documentation on my system, it reverts to v0.1 on page
> > 10/11. Up until now, I'd assumed that that's where you'd got to! However,
> > looking at the source, I see that there's more. It's probably something
> > missing on my system, I've been ignoring the output from makedoc.
>
> You have to rerun makedoc script everytime you update the source from
> cvs server or your postscript files wont be updated.
>
> Best regards
> Tomaz Solc
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFCpGpmsAlAlRhL9q8RAsb+AKCW6SAhSjVHfZ82LzmBsF3R2GAQDACfUEwD
> Sw3QXqG8sAfi1Gg1lsfT8Fs=
> =B1bu
> -----END PGP SIGNATURE-----

-- 
Fight Prejudice - Fight the Ban (see www.countrysidealliance.org)


Received on Mon Jun 06 22:27:42 2005

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:43:53 CEST