I'm afraid you are fundamentally misunderstanding the role and usage of
`this` in JavaScript. Please review the link Steve provided.

>> If you remove the comment to make the call active, and comment out the 3
lines below it you will be able to recreate the problem

Reading carefully, Steve suggested this alteration:

>> update_entire_line.call(this);

Looking up 'Function.prototype.apply' and 'Function.prototype.call' methods
may also be helpful for you.


On Tue, Feb 25, 2014 at 7:27 PM, Just.A.Guy <[email protected]> wrote:

> I think I did. You may find the "update_entire_line" call commented out
> and the three lines in the body of that function
> copied under the comment. If you remove the comment to make the call
> active, and comment out the 3 lines below
> it you will be able to recreate the problem.
>
>
> On Tuesday, February 25, 2014 9:23:37 PM UTC-6, Just.A.Guy wrote:
>>
>>
>>   doing some step by step debug continue, I found the code that calls the
>> "ready" routine
>>   The statement is "this.ready".
>>
>>    Then I noticed that the prototype for the function object does not
>> include the shadowRoot, nor the "this" from the call.
>>    That told me a lot.
>>    Then I did some step-by-step in one of the listener routines.   It
>> also received the "this" from the function proto-type definition.
>>
>>    Therefore, I decided to pass the "this" parameter as part of all
>> functions which I call as sub-functions from one of the polymer callback
>>    routines.
>>
>>    And just before I add a listener to an object in the "ready" routine I
>> attach a reference to the ready routines "this". That way
>>    when the listener receives control it will have address to the
>> elements global values.
>>
>>    I guess another "more elegant" way to do this is to extend the
>> "function" definition into a "polyFunction" and add the
>>    reference to the document fragment to the extended function's
>> prototype so it can be reference without having to pass it as a formal
>> argument.
>>    But implementing that is too complicated for me. So I will stick to
>> the dumb way of doing it.
>>
>>    You really don't want all of those internal functions on the global
>> options list. It reveals too much of the internal structure of the object.
>>    Because as I understand it,  if a function is on the global options
>> list then a script program can call those functions from
>>    a reference to the object (i.e. getElementById).
>>
>>
>>
>>  Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/1f00faf5-a511-417b-ab33-d2161f4a7579%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CAHbmOLYgDNotD%2B0gMg29ykj7tO8zL0%3DfQHmA9jyO2v_H0G5c2g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to