[tw5] putfirst and putlast
Hi Mohammad, According to the documentation putfirst and putlast move a number of items to *the other* end of the list. So in your case you would have to make complicated calculations... Maybe the naming evokes the impression that they move defined items to the beginning or the end of the list. But they do that only for items already at an end of the list, not for any item. My advice would be to make three steps. First store cc in a variable. Then remove it from the list. Then append or prepend to the list. All the best, Thomas -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9ae75b58-8979-420e-9d95-fe3f3e8fb59e%40googlegroups.com.
[tw5] putfirst and putlast
How putfirst and putlast work? - Assume you have a list in *uu *with value: *aa bb cc dd ee* - Then you want using a button move cc to first position or last position - how it can be done? I used the below code it uses uu as a tiddler with a list of above values but seems putlast does not work correctly! \define mreorder() <$tiddler tiddler={{{[[reorder]get[text]]}}}> <$view tiddler=reorder field=text/> <$button class="tc-btn-invisible">down <$action-listops $tiddler="uu" $field="list" $subfilter="+[move]"/> <$button class="tc-btn-invisible">up <$action-listops $tiddler="uu" $field="list" $subfilter="+[move:-1]"/> <$button class="tc-btn-invisible">putfirst <$action-listops $tiddler="uu" $field="list" $subfilter="[]+[putfirst[]]"/> <$button class="tc-btn-invisible">putlast <$action-listops $tiddler="uu" $field="list" $subfilter="[]+[putlast[]]"/> \end <> <$list filter="[list[uu]]"> <$radio tiddler="reorder" field=text value=<>> <$view field=title/> Any suggestion? --Mohammad -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/77def7b7-4136-468f-9163-1c2ee1b46786%40googlegroups.com.