Hi Mark Now it works!!! Nothing is broken even if the tiddler has several linebreaks and it fetches systemtiddlers as well!! Thanks for helping me out explaining the missing section (in the listTiddler) and extra space.. The sectionreference was just an example showing that you *can* fetch a section if it's there...
I had to specify colums *and* rows to make it work (hence the $1*and* $2)... <<tiddler out with: TableOutListTest 3 5>> This is an awesome script that Tobias made - and it surely will find it's use... Thank you very much Tobias - this is pure magic from a true TWWizard ;-) See it in action here: http://tinyurl.com/tableout YS Måns Mårtensson On 13 Nov., 03:43, "Mark S." <[email protected]> wrote: > Hi Måns, > > "problemspammer" ... cute > > Your next problem is that there is no OrListSection > inside of TableOutListTest. > > When I take out the OrListSection specification, it draws a table. > However, all the cells claim the corresponding tiddler can't be found. > Probably because they are all system tiddlers. But it will find and > display non-system tiddlers. > > I'm not sure I understand why you would want to put all these tiddlers > into a table ... since the first line feed will break the table > formatting. > > Mark > > On Nov 12, 4:07 pm, Måns <[email protected]> wrote: > > > > > Hi Mark > > > I'm sorry to be such a "problemspammer" - (don't know a good word for > > it - ) but i *did* try to remove the space - and had the exact same > > errormessages in FF and GC... > > > Now I've saved the changes and you can see it > > onlinehttp://tinyurl.com/yjvhlm5 > > > YS Måns Mårtensson > > > On 13 Nov., 00:41, "Mark S." <[email protected]> wrote: > > > > As I posted before, this line isn't right: > > > > var items=store.getTiddlerText('$1') .split('\n');//linebreaks will do > > > > There is a space between the right parenthesis and the period here: > > > > "('$1') ." > > > > That space must go! > > > > HTH > > > Mark > > > > On Nov 12, 10:24 am, Måns <[email protected]> wrote: > > > > > 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 -~----------~----~----~----~------~----~------~--~---

