Hi Yoann
> BTW, it would be very convenient to add an option so that the search box
> can also search inside shadow tiddler, very useful to search internal.
>
Yes, we definitely need some advanced search options.
> In CanvasTest tiddler I added these lines :
> X : <$edit-text field="X" default="100"/>
> Y : <$edit-text field="Y" default="100" tag="input"/>
>
> First, I would like to get my fields from "DoublePendulum.js" module,
> which is not a widget but just some JS that draw inside a canvas.
> So I tried this base on $:/core/modules/widgets/view.js:
>
> tiddler = this.wiki.getTiddler("CanvasTest");
> simulator.mouse_op(tiddler.fields["x"],tiddler.fields["y"]);
>
> but it seems that this.wiki is not defined in the scope of the module.
> Is there a way to get a tiddler in a JS module ?
>
>
Your widget can access the wiki via this.wiki, and you'll need to pass that
value along into your doublependulum.js module.
> Second question. Since this way of getting the field value introduce a
> dependency to an external tiddler,
> I would like to change my widget call
> <$mycanvas display="DoublePendulum.js">
> to something like (eg : accessing to my field in the widget call)
> <$mycanvas display="DoublePendulum.js" x="{{this:x}} y="{{this:y}}">
> I have no clue how to do that.
> Maybe with macrocall widget ?
>
> You can make an attribute of an HTML element or a widget indirect through
a tiddler text reference like so:
<$mycanvas display="DoublePendulum.js" x={{!!x}} y={{!!y}} />
The double curly braces indicates that the attribute value should be
transcluded, and the content is a text reference, made up of an optional
tiddler title followed optionally by double bang and a field name.
> Last question : can/will the edit-widget have access to data-tiddlers ?
>
> Yes, you can also specify an index for the edit-widget. For example:
https://github.com/Jermolene/TiddlyWiki5/blob/master/themes/tiddlywiki/snowwhite/ThemeTweaks.tid#L11
Best wishes
Jeremy
>
> regards,
>
> --
> 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.
>
--
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.