After some investigation I have reduced my problem to the following,
and I need someone to explain why case B does not work (Case A works
because it is textbook timeline).  For ease of reading I have
eliminated all of the extraneous code and show only the critical
lines.

Case A works:

var eventsource = new Timeline.DefaultEventSource(0);
.... lines omitted for clarity . . .
tl.loadXML(xmlFile, function(xml, url) {
        eventsource.loadXML(xml, url);
 });


case B does not:

var eventsource = new Timeline.DefaultEventSource(0);
.... lines omitted for clarity . . .
var eventX = eventsource;
tl.loadXML(xmlFile, function(xml, url) {
        eventX.loadXML(xml, url);
 });

In the last line of code eventX.loadXML is a call to the loadXML
function of the DefaultEventSource in sources.js.

You may ask, what are the symptoms/results of case B failing?  The
answer is that the events are not painted to the proper band of the
timeline mashup, they appear in the subsequent band with the events of
another eventsource.

Can anyone share some insight?












On Oct 7, 9:24 am, culver <[EMAIL PROTECTED]> wrote:
> I am having a problem extending Timeline to handle variable bands,
> variable event sources, and variable mashups using a URL variable to
> pass a list of sources.
>
> Similar to the religions.html example which has two "fixed" event
> sources and separate bands for each source, however, I want to handle
> the case of n number of bands each with its own source.
>
> I have been successful at creating the bandInfos array of length n,
> and creating n eventSources, and can verify that timeline.create()
> does in fact create n bands.  I can vary the number of bands at will
> (using URL variable list).
>
> The issue is that all of the event sources are all plotted together in
> the n-th band.  My intent is for there to be one source per band using
> the embedded index of bandInfos as the discriminator to create a band
> for each source.
>
> At the top level in ts_define.js, the loadXML code looks like:
>
> for (idx=0 ; (idx <nBands); idx++) {
>         var aFile = GetFromListAt(fileList,idx);      // retrieves an xml
> file from a list of filenames
>         var xmlFile = aFile.replace(/\\+/g,"/");
>         var EventSourceX = window['source' + idx];    //  n eventsources were
> previously defined at window[source1], window[source2],...
>         tl.loadXML(xmlFile, function(xml, url) {
>                  EventSourceX.loadXML(xml, url);      // this works for one 
> project,
> but not for n projects
>     });
>
> }
>
> I have debugged down into the
> Timeline.DurationEventPainter.prototype.paint = function() { .... code
> call .  I anticipated that one event source would be painted for each
> pass through the for loop, but that's not what appears to be
> happening.
>
> I am using a version of Timeline that I downloaded from the MIT
> website before the migration to google.code.  Any clue to what am I
> doing wrong or was there a code change/fix made after my version that
> tweaked this part of the Timeline code?
>
> Any assistance would be much appreciated,
>
> HC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to