TW5 My editable table does not work since 5.0.10

122 views
Skip to first unread message

Danielo Rodríguez

unread,
Jun 18, 2014, 7:43:54 AM6/18/14
to tiddl...@googlegroups.com
Hello

Could someone tell my why the following code is not working anymore? the expected output can be found at braintest.tiddlyspot.com. Probably there is some macro or code new at TW that stops this from working.

The weird thing is that it works on my "personal" wiki, but I don't understand why. Probably a shadow tiddler that I'm inheriting from version to version.

\define fieldsFilter() [title[$(fields-source)$]split:table-fields[,]] 

\define rowFilter() [!has[draft.of]tag[$(filter-tag)$]sort[$(sortField)$]]

\define editbutton()
<span title="edit details"><$button set="$:/temp/editPersona" setTo={{!!title}} class="btn-invisible">{{$:/core/images/edit-button}}</$button></span>
\end

\define delbutton()
<span title="delete entry" class="buttons"><$button message="tw-delete-tiddler" param={{!!title}} class="btn-invisible">{{$:/core/images/delete-button}}</$button></span>
\end

\define editModeButtons()
<$reveal state="$:/temp/editPersona" type="match" text={{!!title}} ><<delbutton>> <<okButton>></$reveal> 
\end

\define viewModeButtons()
<$reveal state="$:/temp/editPersona" type="nomatch" text={{!!title}} ><<editbutton>></$reveal> 
\end

\define okButton()
<span title="OK" class="buttons"><$button message="tw-save-tiddler" param={{!!title}} class="btn-invisible" set="$:/temp/editPersona" setTo="" >{{$:/core/images/done-button}}</$button></span>
\end

\define editCell()
<$reveal state="$:/temp/editPersona" type="match" text={{!!title}} > <$edit-text field=<<currentField>>/> </$reveal>
\end

\define viewCell()
<$reveal state="$:/temp/editPersona" type="nomatch" text={{!!title}}><span><$view field=<<currentField>>/></span></$reveal>
\end


\define displayRows()
<$list filter=<<rowFilter>> >
<tr><td><span>{{!!title}}</span></td>
<$list filter=<<fieldsFilter>> variable="currentField"><td><<viewCell>><<editCell>></td></$list><td><<editModeButtons>><<viewModeButtons>> </td></tr></$list>
\end

\define TableHeaders()
<$list filter="[is[current]split:table-headers[,]]" variable="currentField"><th><$button class="btn-invisible" set="sort-field" setTo=<<currentField>> ><<currentField>></$button></th></$list>
\end


\define add-entry-Row()
<tr class="editable"><td><$edit-text tiddler="$:/temp/table" default="" placeholder="Name" tag="input" /></td><$list filter=<<fieldsFilter>> variable="currentField"><td><$edit-text tiddler="$:/temp/table" field=<<currentField>> placeholder=<<currentField>>/></td></$list><td><span> <$newtiddler title={{$:/temp/table}} clear="$:/temp/table" tags={{!!filter-tag}} skeleton="$:/temp/table" edit="no" class="btn-invisible">{{$:/core/images/new-button}}</$newtiddler></span></td></tr>
\end

<$set name="fields-source" value={{!!title}}>
<$set name="filter-tag" value={{!!filter-tag}}>
<$set name="sortField" value={{!!sort-field}}>

@@.reactive-table
<table>
<thead><tr>
<<TableHeaders>><th>Edit</th>
</tr>
</thead>
<tbody>
<<add-entry-Row>>
<<displayRows>>
</tbody>
</table>
@@

</$set>
</$set></$set>

Thanks in advance.

Danielo Rodríguez

unread,
Jun 18, 2014, 7:54:40 AM6/18/14
to tiddl...@googlegroups.com
OK!! I found it.

It's because the SPLIT operator.
I though it is a standard operator, because I found it in many 5.0.8 wikis.

Is there a new split operator? Why it was not imported when I imported my whole site into a new TW5.0.10 - 5.0.13?

Regards,

Jeremy Ruston

unread,
Jun 18, 2014, 9:45:18 AM6/18/14
to TiddlyWiki
Hi Danielo
 
I though it is a standard operator, because I found it in many 5.0.8 wikis. 

Is there a new split operator? Why it was not imported when I imported my whole site into a new TW5.0.10 - 5.0.13?

Maybe the code was imported but didn't work correctly in 5.0.13?

Best wishes

Jeremy
 

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Stephan Hradek

unread,
Jun 18, 2014, 10:49:22 AM6/18/14
to tiddl...@googlegroups.com
Split was done by me and does not work since the filter operations changed.

I still need to fix that.

Danielo Rodríguez

unread,
Jun 18, 2014, 11:04:23 AM6/18/14
to tiddl...@googlegroups.com
Sorry,

I said that was the problem, the split operator not imported.... but I did not say that importing split.js fixed the issue.

Tested in 5.0.12 and 5.0.13... so maybe you want to check it out again.

Stephan Hradek

unread,
Jun 18, 2014, 11:18:35 AM6/18/14
to tiddl...@googlegroups.com
No. I do not need to check

split will not work until I fix it. And I won't start to fix befor 5.0.13 is out because I want to do it properly.

Stephan Hradek

unread,
Jun 18, 2014, 5:51:19 PM6/18/14
to tiddl...@googlegroups.com
Ah wait!

See what I wote on tiddlstuff:

split is not compatible to TW 5.0.10 at the moment. Please find athe compatible source here. I will fix it soon…

Reply all
Reply to author
Forward
0 new messages