Am Donnerstag, 28. November 2013 15:41:43 UTC+1 schrieb Jeremy Ruston:
>
> 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,
>

Yes. Using this as the HTML name-attribute of the radiobuttons. We need a 
unique name, and I assume tiddler names are unique enough, for each group 
of radiobuttons. Additionally this has the advantage that I have a 
textreference to the tiddlerfield. What I'm doing there is simply 
prepending the current tiddler name and "!!" provided that there is no "!!" 
in the fieldname.
 

> 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:
>

I would have never thought that this handler set or changes a field. But 
now that you've shown it to me, I recognise parts of it from the method I 
used.

To be honest: I think it's rather cumbersome to have such a long method in 
each and every widget which needs to set or change a field. So I thought 
the setTextReference is an appropriate choice. Why would one want to 
duplicate the function of setTextReference?
 

-- 
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