Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37507
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: A very small MVC prototype, for real this time... but need help... of course |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <476ce5c1-2d43-48cb-a935-3803c0195a1f@googlegroups.com> <0ab03e1a-bb5c-4294-b78f-ed6452e0ab0f@googlegroups.com> <XnsAADFE8B7FA177eejj99@194.109.6.166> <c305cdfb-b07c-43ba-8488-b6305aefd83d@googlegroups.com> |
| Date | 2019-10-06 11:39 +0200 |
| Message-ID | <XnsAAE07682CB95Beejj99@194.109.6.166> (permalink) |
luserdroog <luser.droog@gmail.com> wrote on 06 Oct 2019 in
comp.lang.javascript:
> On Saturday, October 5, 2019 at 3:53:18 PM UTC-5, Evertjan. wrote:
>> luserdroog <luser.droog@gmail.com> wrote on 05 Oct 2019 in
>> comp.lang.javascript:
>>
>> > turtle.inc = function(){ this.setValue( this.value + 1 ) }
>>
>> why not skip the setValue definition and do:
>>
>> turtle.inc = function(){ this.value = ++this.value;this.notify(); };
>>
>
> It seems more DRY to call 'notify' in just one place.
I more meant why tou needed a setValue function.
So:
turtle.inc = function(){ this.value = ++this.value; };
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-04 21:43 -0700
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-05 12:52 -0700
Re: A very small MVC prototype, for real this time... but need help... of course "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-05 22:52 +0200
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-05 23:26 -0700
Re: A very small MVC prototype, for real this time... but need help... of course "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-06 11:39 +0200
Re: A very small MVC prototype, for real this time... but need help... of course Silvio <silvio@internet.com> - 2019-10-06 16:42 +0200
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-06 11:22 -0700
Re: A very small MVC prototype, for real this time... but need help... of course "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-06 22:25 +0200
Re: A very small MVC prototype, for real this time... but need help... of course Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-10-06 14:15 -0700
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-06 14:25 -0700
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-12 14:15 -0700
Re: A very small MVC prototype, for real this time... but need help... of course "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-10-12 23:53 +0200
Re: A very small MVC prototype, for real this time... but need help... of course luserdroog <luser.droog@gmail.com> - 2019-10-05 23:38 -0700
csiph-web