Hello!
Much, much thanks!
That drives me into the right direction. Although I've not understand
your inital explanation, I generate my events on the server and direct
access to all of them on the client side is currently not needed.
I found a sample of an "fillInfoBubble" and can access my event
directly and your
this.getProperty("myCustomTitleField");
made it for me!!!
I'll even send custom classes to the client and simple GUIs fitting an
events class and made a simple prototype.
But what I recognized:I must build the whole popup my myself. You
mentioned a "painter". Do you have an example? I just use the
"fillInfoBubble", but must even remove the date and time etc. from the
event.
This tip could be great!
Anyway, much thanks for your help!
br--mabra
On Aug 5, 10:53 pm, Michael Nosal <[email protected]> wrote:
> The JSON loader already gives you access to your original JSON event
> object. For example, in
> Timeline.DefaultEventSource.prototype.loadJSON, look at:
>
> var evt = new Timeline.DefaultEventSource.Event(
> ...
> );
> evt._obj = evnt;
> evt.getProperty = function(name) {
> return this._obj[name];
>
> }
>
> Now you've got a copy of all your original JSON data tacked onto the
> Event object. This is much easier than adding additional arguments to
> the Event constructor.
>
> Then in your painter code, you can just access whatever attributes
> were on your original JSON object:
>
> {"events" : [
> {"start" : "2001", "end" : "2003", "title" : "Blah blah",
> "flavor" : "Cherry"},
> ....
> ]}
>
> You can access the "flavor" attribute in your painter code:
> labelDiv.innerHTML = text;
> labelDiv.title = evt.getProperty("flavor");
>
> Or in the fillInfoBubble code:
> e.g. var title = this.getProperty("myCustomTitleField");
>
> This makes it possible to (with customizations) do just about
> anything, displaying all kinds of custom data, creative new painters,
> advanced layouts, etc.
>
> --Mike Nosal
>
> On Aug 5, 2009, at 4:22 PM, mabra wrote:
>
>
>
>
>
> > Hi !
>
> > Dependent on the type of an event, I wish to provide additional
> > values, which I would see as "custom attributes". From my tests based
> > on json data, these values do not cause any error. But I do not know,
> > how to access them, especially in the event painter.
>
> > Thanks so far!
>
> > br--mabra- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---