ForEachTiddly problem - extra parameters behind write

18 views
Skip to first unread message

Lyall

unread,
Feb 11, 2008, 8:46:30 PM2/11/08
to TiddlyWiki
I receive the message

<<forEachTiddler ...>>: Extra parameter behind 'write': begin "|>|>|>|!
Current Login Definitions|\n|!Definition|!Company|!Domain|!
AuthenticationId|\n"

I utilised http://tiddlywiki.pastebin.com/d241c8665 to paste the code
snippet.

It used to work, it doesn't now, I don't understand why.

Any assistance would be greatly appreciated.

...Lyall


PS. the code is here, for reference, although it has wrapped!

<<forEachTiddler
where
'tiddler.tags.contains(["LoginId"])'
sortBy
'(tiddler.title.toLowerCase())'
write
'"|[[" + tiddler.title + "]]|" +
store.getTiddlerSlice(tiddler.title,"Company") + "|" +
store.getTiddlerSlice(tiddler.title,"Domain") + "|" +
store.getTiddlerSlice(tiddler.title,"Authentication") + "|\n"'
begin
'"|>|>|>|!Current Login Definitions|\n|!Definition|!Company|!
Domain|!AuthenticationId|\n"'
>>

FND

unread,
Feb 12, 2008, 2:40:54 PM2/12/08
to Tiddl...@googlegroups.com
> I receive the message [...]
> Extra parameter behind 'write'

I just tested your code, and it worked just fine.
Could you create upload a testcase somewhere?


-- F.

Lyall

unread,
Feb 12, 2008, 8:48:07 PM2/12/08
to TiddlyWiki
Actually, what I did was download empty.html from tiddlywiki.com
I then imported the forEachTiddlerPlugin from
http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin
I then imported my 'LoginSummary' tiddler (see below and see
http://tiddlywiki.pastebin.com/m2e142f02)
I saved then re-loaded the TiddlyWiki
I then receive

"
<<forEachTiddler ...>>: SyntaxError: missing ; before statement
"

when I attempt to display LoginSummary
(I was running an old version of forEach, 1.0.5)

I have updated http://tiddlywiki.pastebin.com/m2e142f02 with my
current tiddler contents.

The macro invocation is as follows...

=-=-=-=-=-=-
! This page represents a summation of Host Connectivity

Use ConnectToHost to establish connectivity to non-web page hosts.

You may require TunnelsToHost be established.

<<forEachTiddler
where
'tiddler.tags.contains(["LoginId"])'
sortBy
'(tiddler.title.toLowerCase())'
write
'"|[["+tiddler.title
+"]]|"+store.getTiddlerSlice(tiddler.title,"Company")
+"|"+store.getTiddlerSlice(tiddler.title,"Domain")+"|"
store.getTiddlerSlice(tiddler.title,"Authentication")+"|\n"'
begin
'"|>|>|>|!Current Login Definitions|\n|!Definition|!Company|!
Domain|!AuthenticationId|\n"'
>>
=-=-=-=-=-=-=-=-


...Lyall

FND

unread,
Feb 13, 2008, 7:08:04 AM2/13/08
to Tiddl...@googlegroups.com
> http://tiddlywiki.pastebin.com/m2e142f02

That code's missing a "+" before the last slice retrieval:
"|" store.getTiddlerSlice(tiddler.title,"Authentication")

I've made a few more, minor changes:
---------------


<<forEachTiddler
where 'tiddler.tags.contains("LoginId")'

sortBy 'tiddler.title.toLowerCase()'


write '"|[[" + tiddler.title + "]]|"
+ store.getTiddlerSlice(tiddler.title, "Company") + "|"
+ store.getTiddlerSlice(tiddler.title, "Domain") + "|"

+ store.getTiddlerSlice(tiddler.title, "Authentication")+"|\n"'
begin '"|>|>|>|!Current Login Definitions|h\n"
+ "|!Definition|!Company|!Domain|!AuthenticationId|h\n"'
>>
---------------
(cf. http://tiddlywiki.pastebin.com/f22567f9e)

HTH.


-- F.

Lyall

unread,
Feb 13, 2008, 7:21:24 PM2/13/08
to TiddlyWiki
Thanks heaps, I am really confused as to where the plus went, the page
used to work... oh well, maybe I screwed it whilst trying to fix it.

Anyway, it's back in action, much appreciated.

:-)

...Lyall
Reply all
Reply to author
Forward
0 new messages