Re: [tablix-list] Freelesson module

From: Nicholas Robinson <nprREMOVE@THISbottlehall.co.uk>
Date: Mon Jun 06 2005 - 06:52:17 CEST

Hi

Had a go, got something along the lines of what you suggested, but although it
completes without error, it doesn't seem to do what I want!

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". 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.

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.

Best Wishes

Nick

On Sunday 05 June 2005 20:15, Tomaz Solc wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> > I've had a stab at it. The module options are passed to the init function
> > okay and I can get at the options easily. Unfortunately, the opt param to
> > the precalc function is being passed as NULL. I've had a quick look in
> > modsup.c and (I think) I have confirmed this. I can't see an easy way of
> > passing it the opt param within modsup or xmlsup. For the time being,
> > I've created a module global to store it.
>
> Pointer to module options is passed only to the module_init() function.
> After that the memory is freed so the pointer is no longer valid when
> the precalc function is called. You have to parse the options in
> module_init() and store information in a global variable.
>
> Best regards
> Tomaz Solc
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFCo09jsAlAlRhL9q8RArFZAJ9e0T6OSVOBwJgXhCF0ruNZ5if5AwCggXCz
> ZUktBTIqMj6HGWOJYGkLMQQ=
> =z9AQ
> -----END PGP SIGNATURE-----

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


Received on Mon Jun 06 06:52:10 2005

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