This is something I think is overlooked. There are some things a
macro can do that a PrettyLink cannot, and vice versa. For example,
the recent upgrades to <<tiddler>> to incorporate non-TW content.
As far as I know, you cannot pass the URL of a file or site to a
PrettyLink and have it open in an iframe.
(The difference between [[ ]] and << >> being that one opens on click
and the other on load. All basic TW functionality should do either.)
This (setting links to open in tiddlers) should actually be a core
default (with option to override). I detest links opening in a
separate window/tab. It breaks the Fourth Wall (Don't look it up.
That means the imaginary barrier between an actor onstage and the
audience).
I know, Saq said that the coolness of TW is not MCM but education, but
still. I use TW to manage stuff. I want to feel like I am managing
it within the environment. So I can do Tiddly stuff to the data.
So, yeah, not being able to use a macro as the source of a link is a
problem. I don't know how many times I have been frustrated by not
being able to do this thing that is so easy to visualize doing.
Couldn't you do it by going:
[[MyPretty|<iframe src=file:///mypath/mylink.ext display=0 etc></>]]?
But that's a lot to remember.
Or could you pass a parameter to a pre-defined tiddler, like:
::WorkingTiddler
[[MyPretty|ViewTiddler::file:///mypath/mylink.ext]]
::ViewTiddler
<iframe src=param1 etc.></>
Or specify (load) a JavaScript variable in the link to the tiddler,
which then would accept the variable as src=?
::WorkingTiddler
[[MyPretty|OpenLink((var MyVar))]]
::OpenLink
<<newTiddler text="<iframe src=$MyVar></iframe>">>
Plus of course you would want the viewing tiddler to open as many
instances of itself as necessary, if that is even possible...
Maybe there is something basic here. We want a macro to act like a
link sometimes, and a link to act like a macro when we need it to.
One has parameters, the other dynamic control. But the basic spirit
of TW wants to run right over that. We want our choices to have a
steering wheel. In general. But there is something fundamental about
macros and about links that makes that perplexingly difficult.
Now, if you are working in pure JavaScript or, I think, HTML, there is
no problem. But TW is an extra layer of code (defined macros) over
top of both, and that has its little quirks...
See, I can visualize a way to do it. I will leave it to you guys that
actually know something to see if it can be done.
But, like I said, this (cross-training of macros and links) is
something I run into often. I'd prefer, if possible, to see it in the
core as simple notation, rather than as a more complex plugin/macro
where you have to type out some long complex specification every time
you want to use it.
Thanks,
Coby
One final thought: Let's check our paradigm. In my uneducated
opinion, maybe the problem is not how macros are rendered (that is
more or less a given), but with how the TW-unique lookahead syntax
defines the handling of [[ ]]. Maybe we are thinking outside the
wrong box. It's not macros that need fixing, it's links.
Though if you could create a macro that:
a) had a label
b) used an onclick handler
c) opened a new tiddler displaying the link contents
that might work...
But then if you were to create such an animal, we would just be at you
again, begging for a way to dynamically specify the links...
How weird. We want browser-like functionality inside TW inside a
browser.
On the other hand, how useful is a micro-content manager that can only
manage a few kinds of content, in a few ways?