David,

Unfortunately I can't send a URL, my configuration is a little different then 
most of the cases I had seen in the this list. I'm running TimeLine nested 
inside a Yahoo widget. 

I have a widget that opens a window containing a <web> element which displays a 
TimeLine. It intreduced some interesting challenges.

I'm also rebuilding the events graphics once they are loaded. My events are a 
bit complex, each one is built from 4 to 6 sub-events, all of which are 
displayed one over the other so the user sees them as a single event. When I 
build the events I assign an ID to each event in TimeLine and once they all 
load I traverse the events subtree and reconstruct each event <div> element so 
once complete each event <div> contains some sub-elements.

As for the "true", true isue. As far as I can understand the TimeLine code, I 
can use "true", true, "foo" or any other value which is not null. To 
deferintiate between an "isDuration" event and a non "isDuration" event the 
code is just comparing the "instant" parameter of the AddEvent function to 
null. it is the same for other parameters as well. When I had used a "", since 
"" is not a null,  the code assumed that the parameter is true and failed. Once 
I changed the "" to null the code worked.

Right now I had overcome the challenge of dynamically adding events to 
TimeLine. What helped is one, to send nulls instead of ""s. to use the addMany 
function and to send an array of events as the input parameter of the AddManny 
function. The working code is as follows:
function AddEvent(start, end, latestStart, earliestEnd, instant, text, 
description, image, link, icon, color, textColor){
    if (!EventsArray) EventsArray = new Array();
    EventsArray.push(new Timeline.DefaultEventSource.Event(start, end, 
latestStart, earliestEnd, instant, text, description, image, link, icon, color, 
textColor));
}

function CreateEvents(){
    myTimeLine.getBand(0).getEventSource().addMany(EventsArray);
    delete EventsArray; EventsArray = null;
}

I call the AddEvent function for each event I need to add and when done I call 
the CreateEvents function to add them to TimeLine. The "delete EventsArray; 
EventsArray = null;" is a fix for memory leeks in the Yahoo widget engine. 
Without that your memory leeks.

I can tell you that my challenges concerning TimeLine are not over yet. 

Right now I am experiencing arbitrary crashes in the TimeLine code (Crashes 
"general exception err" and everything is going bye bye !). Once I add the 
events I am experiancing crashes when TimeLine repaints the events (During 
scrolling of the TimeLine bands) and crashes when I click an event and TimeLine 
tries to open the description window. I'm not shore what causes the crashes but 
... it's giving me a pain right now.

I will also need to be able to dynamically add/remove bands and events to 
enable TimeLine editing, but thats not started yet.

I don't know if you are part of the developers but, if you are and if there is 
a wish list for TimeLine please add the following:
1) API documentation
2) The ability to set elements IDs from XML or from the addMany function
3) Event nesting, Events built from other sub-events 
    (the whole bundle should be displayed as a single event on the TImeLine.
4) The ability to control TimeLine decisions like: 
    When an event is moved to the next track, 
    When labels of a duration event is painted in or out of the event 
(Alignment ?), 
    The order of the events, which events are on which track 
    etc.
5) Change the exception messages in TimeLine to a more informative error 
messages.

The most painful issue, for me,  right now is the documentation. A simple 
object charts showing the interfaces of each object and the relationships 
between them would be grate.

Best regards

Erez





      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to