Hello BJ,

Sometimes you think that leaving something apart will not help you but it 
does. After a couple of hours a looked at the code and I realized that the 
call to the function was inside a forEach function. That means that this is 
not the "this" I think. I'm ot 100% sure this is the problem, because I 
didn't tested, but looks promising.

Your sentence "Sometimes we think that we can access methods thru the 
'this' variable when we  can't" has triggered my understanding.

Regards.

El jueves, 12 de junio de 2014 12:51:29 UTC+2, BJ escribió:
>
>
>
> On Thursday, June 12, 2014 10:32:08 AM UTC+2, Danielo Rodríguez wrote:
>>
>> Hello
>>
>> I have a doubt about what the TW event handlers can and can not do. 
>>
>> Can an event handler access its widgets methods? I mean those functions 
>> you define as mywidget.prototype.method. I'm having problems with one event 
>> handler that is giving me undefined when I try to access one of those 
>> methods. 
>>
> Hi Danielo, it depends on how you have written your event handler, and dom 
> events differ from widget message events. Sometimes we think that we can 
> access methods thru the 'this' variable when we  can't - usually this is 
> solved by defining a 'self'  variable (do a search thru the widgets to see 
> examples).
>  
>
>> Other question : does tiddlywiky events propagate or they stop at the 
>> first widget that captures them? 
>>
> If you are referring to widget messages, these propagate unless your 
> handler returns the false (or an equivalent like null).
>
> BJ
>
>> Thanks in advance 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to