Referencing tids generically in SideBar

54 views
Skip to first unread message

twgrp

unread,
Jul 7, 2012, 4:46:35 PM7/7/12
to TiddlyWiki
I'm setting up a space to describe ideas, issues etc concerning TW and
TS.

I'm trying to get the sidebar to display the content of tiddlers but
there are difficulties with referencing things. This illustrates it
all:

http://tidref.tiddlyspace.com/
(I'd be more than happy to add user names for anyone wanting to test
things there)

I believe the 3 problems (A,B,C) are probably the same.


Note, in case of need, I've installed WikifyPlugin
and made a zzConfig with
config.evaluateMacroParameters = "full";

Please help. Thank you!!

<:-)

PMario

unread,
Jul 8, 2012, 12:49:32 PM7/8/12
to TiddlyWiki
The macro tells you, what is wrong.
"<<forEachTiddler ...>>: TypeError: context.inTiddler is null"

fET needs to be inside a DOM tiddler context

eg: If you analyse the DOM using FireBug or DevTools you'll see that a
tiddler in the main displayArea looks like this:
<div id="tiddlerTopic__A"
class="tiddler public isTag"
refresh="tiddler"
tags=""
tiddler="Topic_A" <- this is the attribute needed
template="ViewTemplate"> ... </div>

If you open the SideBarTabs tiddler in the main view it doesn't work.
So fET seems to loose it's context if it is within a tab or mayby a
slider. I didn't look at the source but I think fET needs to be
checked. IMO a good starting point would be to check the
getContainingTiddler() stuff.

hope this helps.
-mario

twgrp

unread,
Jul 8, 2012, 6:54:04 PM7/8/12
to TiddlyWiki
> hope this helps.

...well, I figured out what the term DOM means but the wikipedia
article is "too informative" to be of use and to install and learn a
developing environment... it'll have to be another time, but thanks
anyway.

If anyone happens to know a quick fix I'd be more than happy to hear
it.

Thank you all!

<:-)

PMario

unread,
Jul 9, 2012, 5:31:31 AM7/9/12
to TiddlyWiki
Sry, I haven't been clear, as I wrote, I think fET needs to be
checked. You should contact "abego Software" about this. This is the
dev, that may have the fastest fix at hand ;)

-m

twgrp

unread,
Jul 9, 2012, 12:45:27 PM7/9/12
to TiddlyWiki
On Jul 9, 11:31 am, PMario <pmari...@gmail.com> wrote:
> Sry, I haven't been clear, as I wrote, I think fET needs to be
> checked. You should contact "abego Software" about this. This is the

LOL, I thought "checked" was hacker lingo for something.
Thank you for the advice. I wrote to 'abego' and I will post any news
here - but if anyone has any other ideas, they're more than welcome.

<:-)

Udo Borkowski

unread,
Jul 9, 2012, 2:40:57 PM7/9/12
to tiddl...@googlegroups.com
The problem seems to be related to an improper use of "context.inTiddler" to get the title to compare with the tags.

Instead of using "inTiddler" in the nested fET expression just pass the tiddler title as a second parameter to the inner fET expression:

<<forEachTiddler
where 'tiddler.tags.contains("concern")'
write '"<<tiddler [[Topic_A##sub]] with: [["+tiddler.title+"]]  [[Topic_A]] $))\n\n\n"'
>>
/%
!sub
__$1__ <<newTiddler label:"[add new]" tag:"viewerTiddler.title" tag:"$1" >> Ⓑ
<<forEachTiddler
where 'tiddler.tags.contains("$1") && tiddler.tags.contains("$2")'
sortBy 'tiddler.modified' descending
write '"● [["+tiddler.title+"]]\n"'
>>Ⓒ
!end
%/

I also changed that in your TiddlySpace wiki (http://tidref.tiddlyspace.com/) and it solves the issue.

Udo

twgrp

unread,
Jul 9, 2012, 9:06:32 PM7/9/12
to TiddlyWiki
I really, really appreciate your answer, but:

> Instead of using "inTiddler" in the nested fET expression just pass the
> tiddler title as a second parameter to the inner fET expression:

...unfortunately hardcoding it will not work for my application.
Background: I'm designing a theme space [1] so for this reason, the
theme must treat things like titles generically.

But, I'm not sure the problem lies in the fET. The difficulty is
referencing the tiddler whose content is displayed. I've found these
discussions and it does seem to be (or was?) a problematic matter:

http://groups.google.com/group/tiddlywiki/browse_thread/thread/b88d16971bbc5410/4565d7034e5aea02?lnk=gst&q=reference+current+tiddlers+title#4565d7034e5aea02

I've made some changes to the example space reflects the above:
http://tidref.tiddlyspace.com/

I appreciate your kind input, Mario and Udo but will have to put it
on hold for now though as I'll be on limited internet for two weeks
now. All best.

<:-)


[1]
The theme, so far, can be seen at http://theme-a.tiddlyspace.com
and one community relevant application is at http://tidbits.tiddlyspace.com
where I'll write up design suggestions for tiddlywiki/tiddlyspace and
other ideas, reflections, etc
Reply all
Reply to author
Forward
0 new messages