Logs for the RingoJS IRC channel,
as logged by ringostarr.
2011-10-19
[14:37] <hannesw> does anybody have some working ringo websocket demo code?
[14:37] <hannesw> oberhamsi?
[14:38] <oberhamsi> hannesw, probably.. i'll take a look
[14:48] <hannesw> what's your preferred way of handling events:
[14:49] <hannesw> obj.onxxxxx handlers (where xxxxx is the event name), or add(Event)Listener("xxxx", ....), or both?
[14:49] <hannesw> I think node only supports addListener() (and on() as a shortcut), while browsers support both addEventListener() and onxxxxx, right?
[14:51] <oberhamsi> can't get the websocket stuff running now.. to much setup involved, maybe another time
[14:51] <oberhamsi> regarding handling events.. letme check. i usually do addListener
[14:55] <oberhamsi> window.onClick=function... is bad, only one handler possible, i hope no one does that :)
[14:56] <oberhamsi> EventTarget browser spec: http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
[14:58] <oberhamsi> node is weird. instead of remove they have removeAllListeners([event]) �Removes all listeners, or those of the specified event.� lol
[15:03] <hannesw> oberhamsi: thanks
[15:03] <hannesw> node also has a getListeners() i think, giving you all existing listeners...
[15:04] <oberhamsi> ah yes i see � This array can be manipulated, e.g. to remove listeners.�
[15:06] <oberhamsi> i never understood why invent new interface when the one on clientside is adequate
[15:32] <hannesw> addEventListener (w3c) or addListener (node)?
[15:35] <oberhamsi> w3c! :)
[15:37] <hannesw> really?
[15:37] <hannesw> you like dom naming?
[15:38] <oberhamsi> some of it.. it's always very verbose, that's true
[15:40] <hannesw> going offline for ubuntu update...
[18:33] <hannesw> should event names always be lower case?
[18:33] <hannesw> e.g. onFooBar -> event "foobar" or "fooBar"?
[18:35] <hannesw> or should that event be "foo-bar"?
[18:36] <hannesw> I think I'll go with camel-case for now
[21:28] <robi42> hannesw, hannesw_mob, ad events api: i like the way they did it with dart. http://www.dartlang.org/articles/improving-the-dom/ (pretty much at the bottom)
[21:31] <hannesw> robi42: interesting
[21:35] <hannesw> why is this better than, say, the node way? because you can't easily mistype event names?
[21:42] <robi42> yep, less "stringly-typed" :)