[dojo-contributors] dojo.Stateful - long live r23032!

ben hockey neonstalwart at gmail.com
Thu Mar 10 20:53:35 EST 2011


On Mar 10, 2011, at 5:31 PM, Rawld Gill wrote:

> On Thursday 10 March 2011 13:54:30 ben hockey wrote:
>> partial response inline
>>
>> On 3/10/2011 4:16 PM, Rawld Gill wrote:
>>> On Thursday 10 March 2011 06:31:47 Rahul Akolkar wrote:
>>>> On Wed, Mar 9, 2011 at 11:48 PM, Bill  
>>>> Keese<bill at dojotoolkit.org>  wrote:
>>>>> We didn't agree to this at the meeting (or at any other time).
>>>>
>>>> <snip/>
>>>>
>>>> Correct, its MO -- tautologically, I disagree with anyone who
>>>> disagrees with me on something as fundamental as this :-)
>>>
>>> Why is it fundamental? Because you say so?
>>>
>>> Let's try some engineering reasoning on this thread for a moment:
>>>
>>> 1. The documentation for dojo.stateful .watch says:
>>>
>>> "Watches a property for changes"
>>>
>>> and
>>>
>>> "The function to execute when the property changes."
>>>
>>> So, currently, dojo.stateful.watch's specification (the docs) and
>>> implementation (the code) are inconsistent.
>>
>> actually, this is not correct.  if you look at the current state of
>> dojo.stateful.watch, it notifies on all calls to set.  hence the  
>> subject
>> line of this thread.  it was accidentally reverted to this behavior  
>> as
>> part of r23032.
>
> docs at
> https://github.com/dojo/dojo/blob/master/Stateful.js#L83
>
> and code at
> https://github.com/dojo/dojo/blob/master/Stateful.js#L66
>
> are inconsistent. So what are you saying is not correct? My  
> observation? The
> docs? The code?

sorry - for some reason my first reading of your comments was  
interpreted as "the docs and code are consistent".  i now see that you  
actually point out that they are *inconsistent*.  ignore my comment it  
was not based on what you had *actually* written but rather my wrong  
interpretation.

>
> [snip]
>
>>> 4. APIs like stateful are quite common place. I've seen them in many
>>> object systems in many languages. I'm fairly certain that most do  
>>> not
>>> signal on no- ops  (e.g., http://msdn.microsoft.com/en-
>>> us/library/ms692638%28v=VS.85%29.aspx)
>>
>> https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object
>> /watch notifies all watchers any time the property is set  
>> regardless of a
>> change in value.
>
> OK. But at least your example says it signals on set() application  
> (not
> property change).
>
> Best,
> Rawld
> _______________________________________________
> dojo-contributors mailing list
> dojo-contributors at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-contributors



More information about the dojo-contributors mailing list