Hmm - now it seems like there is another parameter I haven't specified
properly:
Error in FF:
TypeError: store.getTiddlerText("TableOutListTest##OrListSection") is
undefined
Error in Google Chrome:
TypeError: Cannot call method 'split' of undefined

Please have a look here: http://tinyurl.com/yjvhlm5

YS Måns Mårtensson


On 12 Nov., 18:23, "Mark S." <[email protected]> wrote:
> Don't know if this is "for real", or a GG line break thing, but this
> line:
>
>  var items=store.getTiddlerText('$1') .split('\n');//linebreaks will
> do
>
> should probably be
>
> var items=store.getTiddlerText('$1').split('\n');//linebreaks will do
>
> HTH
> Mark
>
> On Nov 12, 7:55 am, Måns <[email protected]> wrote:
>
>
>
> > Great Tobias
> > Thanks for clearing things up..
> > I really want to see your script in action - as it has been a thing I
> > wished to be able to do for a long time and it seems to be able to do
> > more than my script does :
> > You also joined the thread where I got my script from 
> > Erichttp://tinyurl.com/yzj4klyInactionhttp://tinyurl.com/yjhghpl
>
> > When I run your script I get "ReferenceError: items is not defined".
> > I haven't changed anything in the script (except for repairing googles
> > linebreaks)-
> > I even called the script "out" as proposed - and made a another
> > tiddler with a lineseparated list which gave me the reference error
> > when run <<tiddler out with: out##OrListSection 3>> -
> > then I changed the list to a lineseparated list with wikilinks [[]] -
> > same error -
> > and finally to a hr-separated list. Same error...
>
> > There's no error shown in the "out" tiddler (if it *should* be blank -
> > that is?) - it's only when I try to run it...
>
> > I will try to deliver a MTC - in about an hour - have to set it up
> > first...
>
> > However - if you see that I've made an obvious mistake (I often do -
> > even if I slow down...) - please reply
>
> > YS Måns Mårtensson
>
> > On 12 Nov., 15:11, Tobias Beer <[email protected]> wrote:
>
> > > Hi Mans,
>
> > > Your scripts doesn't work (here) for a number of reasons.
>
> > > 1) It doesn't output any tiddler text
> > > 2) it doesn't properly close the table on any number of hr-separated
> > > tiddlers that is not a multiple of 5
> > > 3) if it actually was to output tiddler text, it wouldn't work,
> > > because you would have to ensure that the tiddler-text wouldn't break
> > > the table syntax... so you might have to put <<tiddler
> > > embedThisTidder>> into table cells
> > > 4) yet, using <<tiddler SomeTiddler>> to embed its content wouldn't
> > > actually collate the tiddler contents as Morris was looking for
>
> > > Also...
> > > *you don't need hr's... simple linebreaks will do too, even a
> > > bracketed list
>
> > > I have been fiddling with your codebits to make something I would
> > > consider a workable solution:
>
> > > <script>
> > > var i,n,out='',tid,txt;
> > > if('$1'=='$'+'1')return;//no list, no output
> > > var items=store.getTiddlerText('$1') .split('\n');//linebreaks will do
> > > var cols=parseInt('$2');if(isNaN(cols))cols=5;//num cols as 2nd param
> > > n=(parseInt(items.length/cols)+1)*cols;//num cells as multiple of num
> > > cols
> > > for(i=0;i<n;i++){
> > >         if(i&&i%cols==0)out+="|\n";//new row
> > >         ti=items[i];//title
> > >         tid=store.getTiddler(ti);//tiddler
> > >         out+='|'+(tid?'<<tiddler [['+ti+']]>>':(ti?'!@@color:red; "'+ti+'"
> > > not found!@@':''));//add item to row}
>
> > > out+="|\n";//end last row
> > > return out;
> > > </script>
>
> > > Assuming script-tiddler is called 'out', you can call it via
> > > <<tiddler out with: tidderWithList##OrListSection 3>>
>
> > > Where 3 would be the number of columns.
>
> > > Regards, Tobias.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to