Tobias,
The title.replace(/'/g,"'") fixes the single quote problem that
Morris found. The /'/g part is a regular expression to replace all
instances of a single quote with "'" which is the javascript
version of the HTML entity code %27 or a single quote. I think Eric
was generating code quickly, on the fly and just missed putting the
replace(...) code in for setValue, it is needed.
I did some work last night converting the plugin to use fields
instead of <data> elements. Before doing a lot more, let me get that
code and Tobias's contributions into TiddlySpot and pastebin. I'll
have time this evening. As for SVN access, that's a big step isn't
it? ;). I wouldn't want anyone to get the idea that I know what I'm
doing...
Eric - As for why this, originally, used the DataTiddler plugin. I
wanted to see if I could do this plugin using a form from Udo's
FormTiddler plugin. From there it grew into an investigation of how
to reference objects from various places within the document.
Needless to say it got too complex and, being in the midst of it, I
needed another mind to tell me that I was going down a needlessly
complicated path.
Thanks!
-Paul
On Jun 27, 1:12 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> Hi Eric,
>
> > 2) However... it isn't clear to me why you are using DataTiddlerPlugin to store the checkbox state information.
>
> I had the same thought, however I was not sure how field data getting
> and setting was achieved, so I did not fiddle with that as well while
> playing with Pauls code. Thanks for the reference on how this is done
> with CheckboxPlugin. I guess looking at its code may be a good start
> to understand how to use native tiddler fields instead of <data>
> markup within a tiddlers content.
>
> > text+="value='"+store.getValue(title.replace(/'/g,"'"),"task"+i)
>
> What is -- title.replace(/'/g,"'") -- for and why is it only done
> when getting but not when setting field data? Why not simply use
> '+title+' as you did for setting?
>
> I believe you made a little mistake and forgot to reference to the
> fieldname when setting, so that...> text+=" onchange='store.setValue("+title+",this.value)' ></html>|";
>
> should rather look like this:
>
> > text+=" onchange='store.setValue("+title+","task"+i,this.value)' ></html>|";
>
> Is that correct?
Not really - it's essentially just storage with revision history, and
not hard to get used to.
If you're on Windows, TortoiseSVN integrates with Windows Explorer and
makes it very easy to use Subversion.
> It took me a bit longer than expected, but version 0.0.3 is on
> http://kronenpj.tiddlyspot.com/.
You probably want to send this to the Users group, as people will be
interested in that.
-- F.