Hi Stephan

Good stuff. I'd encourage you to get up and running on GitHub so that you
can send pull requests.

One line did jump out:

this.radioField =
this.getAttribute("field").replace(/^(?=(?:[^!]|![^!])+$)/,
this.getVariable("currentTiddler")+"!!");

It looks like you're doing this to convert the provided 'field' attribute
value into a text reference, and then you're using setTextReference() to
set the field value. You shouldn't be using setTextReference, but rather
should do the field modifications in the same way as the fieldmangler
widget:

https://github.com/Jermolene/TiddlyWiki5/blob/master/core/modules/widgets/fieldmangler.js#L73

Best wishes

Jeremy



On Thu, Nov 28, 2013 at 1:41 PM, Stephan Hradek <[email protected]>wrote:

> I just created a widget by ripping the checkbox widget apart ;)
>
> Usage is like so:
>
> * <$radio field="myField" value="1">one</$radio>
> * <$radio field="myField" value="2">two</$radio>
> * <$radio field="myField" value="3">three</$radio>
>
> This would set the field "myField" of the current tiddler to either 1, 2
> or 3.
>
> You can test it on my usual playground http://skeeve.tiddlyspot.com
>
> --
> 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.

Reply via email to