Hi BJ
Appears to work fine. I have updated the <$setfield> widget and uploaded
the new version and updated documentation to: http://wills.tiddlyspot.com/
This update retires the need for the fieldset widget, as multiple
<$setfield> widgets can now be placed one after the other in the stack. As
a consequence, I have removed the fieldset widget from the plugin.
Many thanks for your assistance.
regards
On Thursday, May 29, 2014 9:27:16 AM UTC+2, BJ wrote:
>
> HI Matabele,
> maybe you do not need to regenerate the tw-set-field event, ie your code
>
> this.sendMessage = "tw-set-field";
> if(this.catchMessage) {
> this.sendMessage = this.catchMessage;
> }
> this.dispatchEvent({type: this.sendMessage,param: this.sendParam});
>
>
> can be replace with
>
> return true;
>
> The at present you do not return anything from your handleFieldSet
> function, which is the same as returning null (which is the same as false
> in this case), this stops the event from propagating to the parent widget.
> - returning true will allow propagation (and so you do not need to call
> dispatchEvent()).
>
> all the best
>
> BJ
>
> On Tuesday, May 27, 2014 8:32:05 PM UTC+1, Matabele wrote:
>>
>> Hi Danielo
>>
>> Thanks, that would be appreciated -- it would be much cleaner to stack
>> successive <$setfield> widgets without having to intersperse <$fieldset>
>> widgets.
>>
>> regards
>>
>> On Tuesday, May 27, 2014 7:26:48 PM UTC+2, Danielo Rodríguez wrote:
>>>
>>> I have to digg into your code, but maybe you are not stopping the event
>>> propagation. If so your widget will get the same message twice. I'm not
>>> sure about this and I don't remember exactly how this works. I studied it a
>>> while ago and I think that I understood it then. Just let me check.
>>
>>
--
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.