Coming back to the original subject of this thread, after a fair bit of 
poking around I managed to figure out how things work sufficiently to get 
triggering from a select widget working.  It was a bit more complicated 
than just adding this.invokeActions(event) to handleChangeEvent because (I 
eventually figured out), the contents of the select widget are buried at 
the grandchild level rather than being immediate children.  To fix this, I 
also had to modify the invokeActions() function in widget.js so that if the 
children fail to handle the event, it gets passed on to the children of the 
first child.  I might try to generalise to all grandchildren later, in 
which case it might also fix the problem I raised in a separate thread (
https://groups.google.com/forum/#!topic/TiddlyWiki/6Q6TrAOBnFI).

However, I have a new problem, as you can see from this demo:
http://ng110.tiddlyspot.com/#trigger%20demo

It seems that the value attribute of the action-setfield widget is always 
evaluated before the action has been completed, which means that if I am 
picking up the field controlled by the select widget, then I always get the 
old value.  Anyone have an idea on how to pick up the new value?

Cheers,

Neil.


On Sunday, 4 January 2015 12:30:39 UTC, Neil Griffin wrote:
>
> Thanks Jeremy.  I'll have a delve when I get a moment.
>
> On Sunday, 4 January 2015 10:08:25 UTC, Jeremy Ruston wrote:
>>
>> Hi Neil
>>
>> > The documentation for ActionWidgets on tiddlywiki.com describes the 
>> <$button> widget as an example of a widget that can trigger an action 
>> widget.  Am I right in thinking that currently it is the only way to 
>> trigger an action?
>>
>> That's correct, only the button widget triggers action widgets at the 
>> moment.
>>
>> > how hard would it be to add this feature to the <$select> widget (for 
>> someone with no experience in modifying widgets, but with a can-do 
>> attitude)?
>>
>> It would be fairly straightforward. In the handleChangeEvent handler of 
>> the select widget we need to call self.invokeActions(event).
>>
>> There are a few other widgets that should be enabled, too: link, 
>> checkbox, radio and maybe keyboard, edit-*, dropzone.
>>
>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to