Ok, now I almost have what I want, I'm already able to dynamically generate wiki tables from lua array, and specify which cell should be a title, have specific style and col/row-span. :)
Now my data module[1] use a hash, and what I would like is to sort my array before I generate my wiki table. So reading some documentation, I thought naively that something like the follwing code, I putted in [2] would work:
function compare(a,b) return a[1] < b[1] end
… dekuma = ciferaro.dekuma table.sort(dekuma, compare) …
But no, it doesn't, I still generate a randomly ordered wiki table. So, what did I missed?
[1] http://fr.wikiversity.org/wiki/Module:Fabeleblo/ciferaro [2] http://fr.wikiversity.org/wiki/Module:Fabeleblo
Le lundi 19 août 2013 à 19:31 +0200, Mathieu Stumpf a écrit :
Le lundi 19 août 2013 à 13:08 -0400, Brad Jorsch (Anomie) a écrit :
On Mon, Aug 19, 2013 at 10:37 AM, Mathieu Stumpf < psychoslave@culture-libre.org> wrote:
But while editing the module, calling the function return the expected string.
Are you sure it's returning the expected string? When I call your p.datumtestu() function in the debug console, it returns this:
{| class="wikitable alternance centre" |- |- Datumo1 |- |- Datumo2 |- |- Datumo3 |- |- |- Datumo4 |}
That looks far from correct to me; at the least, the "Datumo" lines should begin with "|" rather than "|-".
You are right, but that's an other problem. Of course it could be a related side effect, but I think that on this point it's just some intertwinned iterations where I messed up on the treatment. I think I can manage that on my own, but having a working testing page would help me doing so. Now as I don't have a clue how to debug the "no result" for the template invokation, may be I'll try to debug that and hopefuly this will unexpectedly make my scope problem go away.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l