Hi Tobias,
воскресенье, 24 февраля 2013 г., 16:59:24 UTC+4 пользователь Tobias Beer
написал:
>
> As a sidenote, I think siders work better for a PluginInfo tiddler...
> especially when titles is rather long. Come to think of it, I guess
> sliders were more handy, if one could (CTRL+)CLICK on the contents to close
> the slider again and scroll back to the button.
>
> Thanks, that's what I needed, feedback about documentation. As for
sliders, I dont think that's a good idea, unless I add an evaluated
transclusion which adds an event handler which would close sliders on
ctrl+click or so -- I hate the need to scroll back and then down again.
That's why I chose tabs (but scrolling up is needed anyway).
Tabs create that grey background by default -- may be that's what you don't
like? I'd agree and I created a small transclusion which added to the end
of the Info tiddler (not published that yet) which changes background color:
<<tiddler {{setStylesheet('div[tiddler="SharedTiddlersPluginInfo"]
.tabContents {
background-color:'+store.getTiddlerText('ColorPalette::Background')+'; }',
'STPInfoCSS');'';}}>>
Probably will add this to the repository with the new version.
> Also, other than using tables to list parameters, I've come to like
> definition lists...
>
> ; option
> :>> description
>
> ...to document alternative options. Looks better than some form of....
>
> option: description
>
> ...with a list of options.
>
> Well, the table is a short summary (with many colomns, so I don't really
see how switching to lists would make this better), and inline descriptions
are below..
> The amount of information for STP is quite overwhelming. Some things are
> not quite clear, esp. "include aware". It's also a bit confusing that you
> seem to speak of "hijacking" core functions whereas your API actually
> provides alternative functions ith no actual hijacking taking place... am I
> wrong?
>
Yeap, that's the main issue about the docs, their amount. What do you think
can be changed here? I added "Basics" section so that one can start from
easy things, but even with all those tabs, the "How to use the
SharedTiddlersPlugin" is very big. May be I need another logic of
description, rather that "reference book"'s one.
"Include aware" term is connected with the way hijacking is done. Actually,
the explanation is in the "Making other plugins "include-aware"" section:
* store.fetchTiddler is actually hijacked
* store.forEachTiddler is not hijacked, Udo's documentation sais that it's
done to avoid included tiddlers get saved in the main TW document;
instead, different core functions are hijacked with the
getFunctionUsingForReallyEachTiddler method (of
config.extensions.SharedTiddlersPlugin) so that when they are launched,
store.forEachTiddler get hijacked and after they are called, it is restored
again. Not a very elegant technique, but it works (I'm not sure if this can
be dangerous when things are done "in parallel" like when setTimeout is
used)
So, if some functions in another plugin do smth using store.forEachTiddler,
depending on what this is, those functions can be modified
getFunctionUsingForReallyEachTiddler as well -- or be not modified which
can be desirable if they some saving stuff.
May be there's another way to handle this.. some sort of "forbidding saving
for included tiddlers" which which store.forEachTiddler can be actually
hijacked. I should think of this, that's not a simple issue.
As for the orig_fetchTiddler, well, it doesn't prevent fetchTiddler being
hijacked. Just take a look at the source, and you'll see:
var orig_fetchTiddler = store.fetchTiddler;
window.sharedTiddlersAPI.orig_fetchTiddler = orig_fetchTiddler;
// reserve access to the original method to be able to fetch tiddlers
from main store,
// including substituted ones
store.fetchTiddler = function(title) {
...
Here's a pecularity: I was thinking that if I create a variable
(orig_fetchTiddler) then there are two copies of the function and changing
window.sharedTiddlersAPI.orig_fetchTiddler won't cause any changes in
store.fetchTiddler, but I probably was wrong.. That's not very important,
though..
Will be glad to hear further notes.
Best regards,
Yakov.
>
> Cheers, Tobias.
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.