refreshView() in Progress? (was Fwd: [Commits] svn commit: 6607)
Eli Cochran
eli at media.berkeley.edu
Fri Feb 27 17:01:20 UTC 2009
Sorry, meant this to go to fluid-work as well.
I think that .refresh() method was named that back before we started
calling it .refreshView(). I think that you're right. Thanks for
helping me think about it that way. Although it's a little different
that most of refreshView methods which update the view to match the
current model. This one is really designed to refresh the view to
changes in the DOM (although as a side effect it also updates itself
to the model as well. Very light model, what's the current percent,
which doesn't have it's own external interface so I'm not even sure
that I can call it a model.)
Sorry to ramble. I'll take a quick look at the code again.
Thanks,
Eli
On Feb 27, 2009, at 7:18 AM, Colin Clark wrote:
> Hey Eli,
>
> Awesome commit. Nice to see that we're able to simplify the Progress
> component's API over time, and it's great to see it getting some use
> outside Uploader, too.
>
> Begin forwarded message:
>
>> In Progress changed this:
>>
>> that.refresh = function (newProgressBarElm) {
>> if (newProgressBarElm) {
>> that.progressBar = newProgressBarElm;
>> }
>>
>> repositionIndicator(that);
>> };
>>
>> To this:
>>
>> that.refresh = function () {
>> repositionIndicator(that);
>> };
>
>
> One super minor point. Should this method be named refreshView() to
> be consistent with our framework-wide convention? refreshView() is
> typically a method implemented by all Views, and is responsible for
> re-drawing the component when a change has been made in the model or
> state of the component.
>
> Is this the sort of thing you intend the refresh() method to be used
> for, or does it do something different?
>
> Again, nice work on this.
>
> Colin
>
> ---
> Colin Clark
> Technical Lead, Fluid Project
> Adaptive Technology Resource Centre, University of Toronto
> http://fluidproject.org
>
. . . . . . . . . . . . . . . . . . .
Eli Cochran
user interaction developer
ETS, UC Berkeley
More information about the fluid-work
mailing list