Link fields

2 views
Skip to first unread message

Udo Borkowski

unread,
Apr 27, 2006, 9:26:59 AM4/27/06
to Tiddly...@googlegroups.com
As I wrote the response to Simon's parentTiddler mail I thought if we
may need some core support for "link fields" in general. By "link
fields" I mean metadata fields that hold "Links" , i.e. a list of
tiddlers. This would not just be for "parent" but any other kind of
relations between tiddlers, like "DoThisBefore", "SeeAlso", "Children", etc.

Of cause it is no problem to use the normal metadata fields to capture
such links, e.g. with a bracketed list. But I could imagine it would be
nice to better integrate these link fields into the TiddlyWiki
structure. E.g. I imagine that such links also appear in the
"References" list (at least optional), or are considered when looking
for "orphans", "missing" etc.. As far as I know currently there is no
nice way to extend these internal "references" (currently stored in the
"links" Tiddler property).


Udo

Simon Baird

unread,
Apr 27, 2006, 10:06:07 AM4/27/06
to Tiddly...@googlegroups.com
Heh, I just wrote something similar to this in the other thread. Should have read ahead...!
--
Simon Baird <simon...@gmail.com>

Jeremy Ruston

unread,
Apr 28, 2006, 10:52:01 AM4/28/06
to Tiddly...@googlegroups.com
Oh, nice idea, Udo, definitely be interested in that.

Of course, the 'references' list is funny because it's dynamically
computed; I can imagine ways of structuring it to look like a piece of
EMD, though.

Cheers

Jeremy


--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com

Udo Borkowski

unread,
Apr 29, 2006, 10:11:12 AM4/29/06
to Tiddly...@googlegroups.com
definitely be interested in that.

While working on this I came across the "links" field in the Tiddler. This is currently an array.
Would it be OK to change this to an object, with a property for every link. This would speed up creating the link information since we no longer need to call the expensive "pushUnique".

This change may be "incompatible" if we assume that the "links" field is accessed from outsite (e.g. by plugins). I am not aware of any such plugin, but ...



This lead to a more general proposal to avoid future compatiblity problems:

I suggest extensions should not directly access fields of core objects, but use accessor functions instead. If no such accessor exists (like for "links") it should be added . E.g.:

Tiddler.prototype.getLinks = function() {
    return this.links;
}



Udo

Jeremy Ruston

unread,
May 2, 2006, 1:46:34 PM5/2/06
to Tiddly...@googlegroups.com
Yup, Udo, I agree with both proposals, good thinking.

Cheers

Jeremy.

Reply all
Reply to author
Forward
0 new messages