>
> I find this syntax incredibly cumbersome compared to tw2 and I am quite
> reluctant to use it.
>

Yes it is cumbersome in that form. In TW5 there's a layered concept for
wikitext functionality:

* Widgets provide the base functionality, and we break the widgets down
into the smallest, simplest possible things, designed to be used in
combination with one another

* Macros are used to define more expressive, easy to type, blocks of
functionality. Macros are application-specific, and are encouraged to pack
a lot of functionality into one black box.

* Wikitext syntax provides an even briefer, shortcut way of invoking
certain widgets

So, what you're seeing here is how sliders are implemented at the deepest
level, that of the underlying widgets.

For example, one could define a slider macro like so:

\define slider(label,text)
<$button popup="$:/state/$label$">$label$</$button>
<$reveal type="nomatch" text="" default="" state="$:/state/$label$"
animate="yes">
$text$
</$reveal>
\end

And then invoke it with:

<<slider "Click me!" "This is a revealing sentence">>

The plan is for TW5 to include a bunch of built in macros, similar to TW
classic.


> In fact, I don't even want to (be forced to use) a state unless explicitly
> specified. All I'd want is for the slider to be independent and to thus not
> open a number of them by virtue of putting this in the same tiddler...
>

Storing state isn't something that's optional that we can choose not to do.
It's a cornerstone of the TW5 architecture; the UI elements like tabs
require state in order to provide the functionality that users expect.

Anyhow, we can hide the state mechanism behind macros; people only need to
understand the state mechanism if they're trying to build complex
functionality up out of widgets.


> When do I need slider states persisted within tiddlers? Mostly never.
>

The reason that state is stored in tiddlers isn't to enable it to be
persisted, it's a more fundamental aspect of the design. During refresh
processing arbitrary DOM nodes may need to be destroyed and recreated, so
we can't store state in the DOM.

Best wishes

Jeremy


>
> <$slide text="Click me...">
> You clicked!
> </$slide>
>
> - tobias
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to