Mr. Nosal,

You javascript guys are amazing.

Us database guys think having a programming language that is case sensitive is 
complete madness.

It has cost me many hours of frustration.

As the reason why my code didn't work is because my:

Var centerDateXQK3K0LEY = band.getCenterVisibleDate();

Where the command "Var" should be "var".

It took one of my kids to spot this... I lost a whole day because of this...


Is there any way to avoid this type of mistake in the future, or do I have to 
waste many hours every time this type of thing occurs?

Javascript is so unforgiving with this type of thing, with no indication as to 
what the problem is.

I need a case sensitive programming language like a fish needs a bicycle. lol

 
Thanks 
Jeff Roehl
jroe...@yahoo.com
(818) 912-7530


>________________________________
> From: Michael Nosal <mno...@mitre.org>
>To: simile-widgets@googlegroups.com 
>Cc: "simile-widgets-...@googlegroups.com" 
><simile-widgets-...@googlegroups.com> 
>Sent: Friday, January 27, 2012 9:03 AM
>Subject: Re: [Simile-Widgets] I cant get these timelines to scroll together
> 
>
>Make sure that you are creating separate bandInfos for each timeline, not 
>passing the same one to each call to create your new Timeline.
>The centerVisibleDate depends on the ether being used for the band, and if you 
>pass the same bandInfo objects to multiple timelines, they end up all using 
>the same ether.
>
>
>You might also find it easier to use a mediator pattern for synchronizing your 
>timelines. You avoid having them refer to each other explicitly and can 
>centralize the logic for how they interact. 
>Super-trivial example:
>
>
>function Mediator(listeners) {
>  this._listeners = listeners;
>  }
>
>
>Mediator.prototype.sync = function(date) {
>var i = this._listeners.length;
>while (i--) {
>this._listeners[i].getBand(0).setCenterVisibleDate(date);
>}
>}
>
>
>var mediator = new Mediator([TEOI81A2X,XQK3K0LEY,VOY3K0LEW]);
>
>
>TEOI81A2X.getBand(0).addOnScrollListener(function(band) {
>  mediator.sync(band.getCenterVisibleDate());
>});
>            
>XQK3K0LEY.getBand(0).addOnScrollListener(function(band) {
>  mediator.sync(band.getCenterVisibleDate());
>});
>            
>VOY3K0LEW.getBand(0).addOnScrollListener(function(band) {
>  mediator.sync(band.getCenterVisibleDate());
>});
>
>
>--Mike
>
>
>On Jan 26, 2012, at 8:45 PM, Jeff Roehl wrote:
>
>
>TEOI81A2X.getBand(0).addOnScrollListener(function(band) {
>>Var centerDateXQK3K0LEY = band.getCenterVisibleDate();
>>XQK3K0LEY.getBand(0).setCenterVisibleDate(centerDateXQK3K0LEY);
>>});
>>
>>XQK3K0LEY.getBand(0).addOnScrollListener(function(band) {
>>Var centerDateVOY3K0LEW = band.getCenterVisibleDate();
>>VOY3K0LEW.getBand(0).setCenterVisibleDate(centerDateVOY3K0LEW);
>>});
>>
>>VOY3K0LEW.getBand(0).addOnScrollListener(function(band) {
>>Var centerDateTEOI81A2X = band.getCenterVisibleDate();
>>TEOI81A2X.getBand(0).setCenterVisibleDate(centerDateTEOI81A2X);
>>});
>> 
>
-- 
>You received this message because you are subscribed to the Google Groups 
>"SIMILE Widgets" group.
>To post to this group, send email to simile-widgets@googlegroups.com.
>To unsubscribe from this group, send email to 
>simile-widgets+unsubscr...@googlegroups.com.
>For more options, visit this group at 
>http://groups.google.com/group/simile-widgets?hl=en.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to simile-widgets@googlegroups.com.
To unsubscribe from this group, send email to 
simile-widgets+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en.

Reply via email to