Alert - Alert!!!
I don't know what makes it happen - but when I've saved the code - and
reload - it looses all the backslashes (\) - and the code doesn't
work anymore!!!
This:
<<forEachTiddler where ' tiddler.tags.contains
(context.inTiddler.title)' write '(index < 200)?
"|"+(index+1)+"|[["+tiddler.title+"]]|[["+tiddler.data("Gang")+"]] |
[["+tiddler.data("Værelse") +"]] | <<toggleTag HU
[["+tiddler.title+"]] nolabel \>\> | <<toggleTag Syg [["+tiddler.title
+"]] nolabel \>\> |\n" : ""'begin
'"|sortable|k\n|!#|Navn|Gang|Værelse|HU|Syg|h\n"'
end 'count+" K-elever\n"' none '"Ingen K-elever i denne gruppe\n"'
>>
Becomes:
<<forEachTiddler where ' tiddler.tags.contains
(context.inTiddler.title)' write '(index < 200)? "|"+(index+1)+"|
[["+tiddler.title+"]]|[["+tiddler.data("Gang")+"]] | [["+tiddler.data
("Værelse") +"]] | <<toggleTag HU [["+tiddler.title+"]] nolabel >> |
<<toggleTag Syg [["+tiddler.title+"]] nolabel >> |n" : ""'begin '"|
sortable|kn|!#|NavnGang|Værelse|[[HU]]|[[Syg]]|hn"'
end 'count+" K-elevern"' none '"Ingen K-elever i denne gruppen"'>>
As You can see ALL backslashed vanish in thin air!! When I put them in
again everything works again.....
I am using BidiX's ITw ... and I've never experienced anything like
this before... very very weird...
Please help me...
YS Måns Mårtensson
On 26 Feb., 01:03, Måns <[email protected]> wrote:
> Hi cmari and Ken
>
> NOW IT WORKS - (almost) ALL OF IT!! (The rest is just refinements)
> I'm very sorry for my outbursts and long sentences in this post - but
> this is very great news for me - and i think you should know - Read it
> or leave it ... It's just me getting excited beeing a novice and
> all...
>
> What you've just written makes everything fall into place. What Ken
> wrote was essential for getting toggletags into my forEachTiddler
> macro - and You made me understand why I couldn't make it work untill
> I changed == into: contains ...
>
> When I asked the question, I thought that I needed the complete code
> from someone who knows how to write code - because it's way too
> complicated for me to figure out myself - but You just explained it in
> a way that makes me understand what is going on.
>
> Now after 3 weeks of fiddling around in the dark - it suddenly
> works :-)
>
> Thank You very very much - Both of you
> Now I'm able to populate tiddlers with "interactive" content (toggles
> tags remotely) and I don't have to write all students names manually
> - .... as I've done up till now - You've really saved my day - and
> next semester too!!!!
>
> Now I'm curious if I can make a template where the toggletagging works
> as it should - I've tried to include toggletags in templates before -
> and they didn't work (maybe because the toggletagmacro worked inside
> the templatetiddler instead of the actual tiddler it was copied to??).
>
> I will give it a try - even so - if I don't succeed I won't give up -
> I will also try to compose a newtiddler button with prefilled text to
> see if it does the trick - and again if that doesn't work - I just
> copy my code into each teachers tiddler by hand..
>
> Here's the actual code combining everything I wanted to list in the
> tables and IT WORKS LIKE A CHARM!!
> I really hope that you understand that this has made my day - and days
> to come!! - Thank you again - VERY much!!
> :
>
> <<forEachTiddler where ' tiddler.tags.contains
> (context.inTiddler.title)' write '(index < 200)? "|"+(index+1)+"|
> [["+tiddler.title+"]]|[["+tiddler.data("House")+"]] | [["+tiddler.data
> ("Room") +"]] | <<toggleTag HereForTheWeekend [["+tiddler.title+"]]
> nolabel \>\> | <<toggleTag SickLeave [["+tiddler.title+"]] nolabel \>
> \> |\n" : ""'begin '"|sortable|k\n|!#|Name|House|Room|
> HereForTheWeekend|SickLeave|h\n"'
> end 'count+" students\n"' none '"No students for this teacher\n"'
>
>
>
> YS Måns Mårtensson
>
> On 25 Feb., 23:59, cmari <[email protected]> wrote:
>
> > Hi Måns,
> > I started with the most recent of your messages so I don't know
> > whether this will get you any further toward your ultimate goal, but
> > you can make the last version you posted work by adding back in the
> > word "write" .
>
> > When I tested that, I noticed that of course using a checkbox to add a
> > tag to a tiddler listed on your table will have the result that the
> > tiddler will have two tags - which means it won't meet the search
> > criteria of 'tiddler.tags == context.inTiddler.title' anymore. If you
> > want a more inclusive approach, you could use "contains" instead of
> > "==". So if you were going to do that, the new version restoring the
> > somehow lost "write" would start like this:
>
> > <<forEachTiddler where ' tiddler.tags.contains
> > (context.inTiddler.title)' write '(index < 200) ? "|"+.....
> > cmari
>
> > On Feb 25, 3:40 pm, Måns <[email protected]> wrote:
>
> > > When I write this:
> > > <<forEachTiddler
> > > where
> > > ' tiddler.tags == context.inTiddler.title '
> > > '(index < 200) ? "|"+(index+1)+"|[["+tiddler.title+"]]|[["+tiddler.data
> > > ("A")+"]] | [["+tiddler.data("B") +"]] | <<toggleTag A
> > > [["+tiddler.title+"]] nolabel \>\> | <<toggleTag B [["+tiddler.title
> > > +"]] nolabel \>\> |\n" : ""' >>
>
> > > I get this: <<forEachTiddler ...>>: Unknown action '(index < 200) ?
> > > "|"+(index+1)+"|[["+tiddler.title+"]]|[["+tiddler.data("A")+"]] |
> > > [["+tiddler.data("B") +"]] | <<toggleTag A [["+tiddler.title+"]]
> > > nolabel \>\> | <<toggleTag B [["+tiddler.title+"]] nolabel \>\> |\n" :
> > > ""'.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---