[10:00AM] dylan_: ​hey ​[10:00AM] slightlyoff: ​howdy! ​[10:00AM] ttrenka joined the chat room. (10:00AM) [10:00AM] ttrenka: ​i'm here ​[10:00AM] slightlyoff: ​neat ​[10:01AM] ttrenka: ​probably can't talk too long though ​[10:01AM] slightlyoff: ​OK ​[10:01AM] ttrenka: ​but while we wait...http:/​​/​​www.simonkelk.co.uk/​​mainframe-misc-heaven-sk.html [10:01AM] ttrenka: some mild entertainment for you. ​[10:02AM] dylan_: ​lol ​[10:02AM] ttrenka: ​apparently I'm going to burn in HELL ​[10:02AM] slightlyoff: ​nice ​[10:02AM] ttrenka: ​:) ​[10:02AM] dylan_: ​i've been enjoying paul graham's latest: http:/​​/​​paulgraham.com/​​hs.html ​[10:02AM] ttrenka: ​yeah [10:02AM] ttrenka: was reading that before, didn't realize that was a new one [10:03AM] ttrenka: how long do we want to wait? ​[10:03AM] dylan_: ​5 min? ​[10:03AM] ttrenka: ​ok ​[10:04AM] dylan_: ​schontz might join, what about mda? ​[10:04AM] slightlyoff: ​MDA isn't respoding to IM, so he seems doubtful ​[10:04AM] ttrenka: ​david isn't signed in at all either ​[10:04AM] slightlyoff: ​call him? [10:04AM] slightlyoff: (schontz) [10:04AM] slightlyoff: ;-) ​[10:04AM] ttrenka: ​if you want ​[10:04AM] slightlyoff: ​nah, no big deal ​[10:04AM] dylan_: ​i have no cell service at my desk ​[10:05AM] ttrenka: ​k [10:05AM] ttrenka: someone want to explain this action tag, then? [10:05AM] ttrenka: ;) ​[10:05AM] dylan_: ​well, the idea was to treat events/actions like any other property set ​[10:06AM] ttrenka: ​ok ​[10:06AM] dylan_: ​and to support both normal dom style events, and AOP style advice ​[10:06AM] slightlyoff: ​mda just joined the land o the living ​[10:06AM] ttrenka: ​heh ​[10:06AM] dylan_: ​if you haven't already, take a look at the files in /templates ​[10:06AM] ttrenka: ​ok, let me do an update [10:07AM] ttrenka: if I can ​[10:07AM] slightlyoff: ​which ones? and which lines? ​[10:07AM] ttrenka: ​bollocks ​[10:07AM] dylan_: ​dojoml.xml, and exampleApp.xml, grep for event and connect ​[10:08AM] slightlyoff: ​bollocks? ​[10:08AM] dylan_: ​that's the latest work i've done on it, which was sometime last year ​[10:08AM] ttrenka: ​yeah [10:08AM] ttrenka: sorry, just figured out why I was having issues with SVN [10:08AM] ttrenka: ok ​[10:08AM] mda joined the chat room. (10:08AM) [10:08AM] ttrenka: ​I'm seeing this: [10:09AM] ttrenka: [10:09AM] ttrenka: [10:09AM] ttrenka: [10:09AM] ttrenka: [10:09AM] ttrenka: [10:09AM] ttrenka: in dojoml.xml, right? ​[10:09AM] dylan_: ​yup ​[10:09AM] slightlyoff: ​hrm, does that mean that we never got around to the tag? [10:09AM] slightlyoff: or is connect just a synonym? ​[10:09AM] dylan_: ​same thing, just a different name ​[10:10AM] ttrenka: ​ok [10:10AM] ttrenka: still seems like DOM 0 [10:10AM] ttrenka: is that right? ​[10:10AM] slightlyoff: ​not really ​[10:10AM] ttrenka: ​in terms of a single function being assign [10:10AM] ttrenka: assigned ​[10:10AM] slightlyoff: ​I can have multiple sets of these [10:10AM] slightlyoff: all pointing at the same function ​[10:10AM] ttrenka: ​...i actually see it as more of a cross between DOM 0 and XBL [10:10AM] ttrenka: I think ​[10:11AM] slightlyoff: ​and they can be set to be either before-advice, after-advice, or around-advice ​[10:11AM] ttrenka: ​ok [10:12AM] ttrenka: this is going to sound stupid. ​[10:12AM] slightlyoff: ​so in the same waht that you could do __sig__.connect() or dojo.event.connect(), you use to accomplish method interception ​[10:12AM] dylan_: ​so we had some issues when thinking about this before, but i want to get your opinion and ideas before getting into that :) ​[10:12AM] ttrenka: ​but what's the issue? [10:13AM] ttrenka: are you guys waiting for an opinion from me? ​[10:13AM] dylan_: ​so i guess the first questions i have then are, does this make sense, is it flexible, does it do what it should, is it easy to use? ​[10:14AM] ttrenka: ​oh ok ​[10:14AM] mda: ​one thing that comes to mind is that with mandatory instance-to-instance wiring, you can't just say anymore "this is a click handler" ​[10:14AM] ttrenka: ​concur ​[10:14AM] mda: ​like if a container widget has 50 buttons in it. ​[10:14AM] slightlyoff: ​yes ​[10:14AM] dylan_: ​we would still allow that in inline markup ​[10:14AM] slightlyoff: ​how? [10:14AM] slightlyoff: I've actuallly hacked this in to the current system [10:15AM] slightlyoff: where if you give the name of a function on the widget class to the ctor, it'll create a new anonymous function out of it [10:15AM] slightlyoff: and then connect it [10:15AM] slightlyoff: the problem with this is that it's limited to events that are explicitly supported ​[10:15AM] dylan_: ​right ​[10:15AM] mda: ​why is it so limited? ​[10:16AM] slightlyoff: ​so there's a breif syntax on the template to allow attachment ​[10:16AM] ttrenka: ​k ​[10:16AM] slightlyoff: ​well, that was my concern, and why we're all in IRC today = ) ​[10:16AM] mda: ​if i've got a component that has an onX() function, it can be called for any X() event. [10:17AM] mda: that isn't new, that is how VB, and lots of other method/property/events RAD systems do things. ​[10:17AM] ttrenka: ​yep ​[10:17AM] slightlyoff: ​right ​[10:17AM] ttrenka: ​i have a q ​[10:17AM] slightlyoff: ​but the DOM provide more events that we're currently supporting on these things ​[10:17AM] ttrenka: ​how do the connect and event tags establish context? ​[10:17AM] dylan_: ​that's one of the issues :) ​[10:18AM] ttrenka: ​gotcha. ​[10:18AM] mda: ​and does the handler get the identical args of the originating function? ​[10:18AM] slightlyoff: ​yes [10:18AM] slightlyoff: it's after-advice in the current system ​[10:18AM] ttrenka: ​ok [10:19AM] ttrenka: where does one define the handlers themselves? ​[10:19AM] mda: ​so where is the side-effect context? like the glorious window.event? ​[10:19AM] slightlyoff: ​my other concern is replacement ​[10:19AM] ttrenka: ​(grill grill grill :)) ​[10:19AM] slightlyoff: ​heh ​[10:19AM] dylan_: ​the handlers themselves are script ​[10:19AM] slightlyoff: ​well, right now I think the side effect context is the place where we say new Function("this is some script"); ​[10:20AM] david_ascher joined the chat room. (10:20AM) [10:20AM] slightlyoff: ​hi david! ​[10:20AM] ttrenka: ​thta's not how it actually works, is it? ​[10:20AM] david_ascher: ​hi all ​[10:20AM] dylan_: ​hey david ​[10:20AM] ttrenka: ​hi ​[10:20AM] slightlyoff: ​actually, yes [10:20AM] slightlyoff: (and I don't like it either) [10:20AM] slightlyoff: let me get you code...one sec... ​[10:20AM] ttrenka: ​using the new Function constructor? ​[10:20AM] mda: ​but callee has to be able to find out stuff about the originating object right? ​[10:20AM] slightlyoff: ​open problem ​[10:20AM] ttrenka: ​executing it in the global context? ​[10:21AM] mda: ​or is this another thing as a consequence of one-to-one wiring, there has to be a new function written for every handler to hardwire knowledge of the originator? [10:21AM] mda: that doesn't sound right :) ​[10:21AM] ttrenka: ​ugg ​[10:21AM] slightlyoff: ​http:/​​/​​dojotoolkit.org/​​viewcvs/​​viewcvs.py/​​*checkout*/​​src/​​webui/​​widgets/​​Parse.js?content-type=text​​%2Fplain​&rev=245 [10:21AM] slightlyoff: well, it's not one-to-one wiring [10:22AM] slightlyoff: or rather, it's many to one, but you're only allowed to attach to the events we make explicit ​[10:22AM] ttrenka: ​line #? ​[10:22AM] slightlyoff: ​and that's my main concern with the system [10:22AM] slightlyoff: grr, wrong file [10:22AM] slightlyoff: one sec = ) ​[10:22AM] ttrenka: ​heh ​[10:22AM] slightlyoff: ​http:/​​/​​dojotoolkit.org/​​viewcvs/​​viewcvs.py/​​src/​​webui/​​Widget.js?rev=246​&view=auto [10:22AM] slightlyoff: look at "mixInProperties" [10:23AM] slightlyoff: or just search for dojo.event.connect() ​[10:23AM] ttrenka: ​ok ​[10:24AM] slightlyoff: ​the other half of this is in the template creation code ​[10:24AM] ttrenka: ​no idea what rev I'm looking at, but it's line 149 ​[10:24AM] slightlyoff: ​let me find that [10:24AM] slightlyoff: heh ​[10:24AM] ttrenka: ​ok, here's a q. [10:24AM] ttrenka: event.connect, when you pass it the "this" reference ​[10:24AM] slightlyoff: ​that's the widget object ​[10:25AM] ttrenka: ​is that where you are establishing execution context for the new Function? [10:25AM] ttrenka: i.e. when that function is fired, is it firing in the context of "this"? ​[10:25AM] slightlyoff: ​yes, implicitly, and badly ​[10:25AM] ttrenka: ​ok ​[10:25AM] dylan_: ​why badly? ​[10:25AM] slightlyoff: ​'cause it's not explicitly handled ​[10:26AM] ttrenka: ​one of the big things I did when I did the event system for f( m ) was to get around this issue by making sure the first arg passed to any handler function was the context of execution ​[10:26AM] slightlyoff: ​it's just a side effect right now ​[10:26AM] dylan_: ​ok ​[10:26AM] slightlyoff: ​...and not the event object like a normal event handler would want? ​[10:26AM] ttrenka: ​oh, that's the second arg [10:26AM] ttrenka: :) ​[10:26AM] slightlyoff: ​heh ​[10:26AM] ttrenka: ​that's why every handler in f( m ) expects only 2 args [10:26AM] ttrenka: source and event objects, ​[10:27AM] slightlyoff: ​right ​[10:27AM] ttrenka: ​it makes it a bit easier to write handlers against it. ​[10:27AM] slightlyoff: ​well, we have something similar for around advice ​[10:27AM] ttrenka: ​right [10:27AM] ttrenka: but. ​[10:27AM] slightlyoff: ​where if you want to really, really intercept the function, you get a context as an argument ​[10:27AM] ttrenka: ​why is that not the default behavior? [10:28AM] ttrenka: or are you executing the new Function object in context? ​[10:28AM] slightlyoff: ​well, because it would make everyone write every function our way ​[10:28AM] ttrenka: ​i.e. "this".call(funcObject) ​[10:28AM] slightlyoff: ​instead of being able to retrofit old code with the event system ​[10:28AM] ttrenka: ​...and what's wrong with that idea? [10:28AM] ttrenka: k [10:28AM] ttrenka: wait [10:29AM] ttrenka: above should be funcObject.call("this"_ [10:29AM] ttrenka: sorry [10:29AM] ttrenka: whoops [10:29AM] ttrenka: is being able to retrofit an existing app one of the primary goals of this system? ​[10:29AM] david_ascher left the chat room. (10:29AM) Reason: " The IRC Client of the Gods! -> http:/​​/​​www.hydrairc.com <- HydraIRC" [10:29AM] slightlyoff: ​yes ​[10:29AM] ttrenka: ​why? ​[10:30AM] slightlyoff: ​lower the barrier to entry, the better ​[10:30AM] ttrenka: ​(I don't remember talking about this, that's all) [10:30AM] ttrenka: ok ​[10:30AM] slightlyoff: ​people shouldn't have to swallow a lot ot use Dojo [10:30AM] slightlyoff: only what they want/need ​[10:30AM] dylan_: ​the first hit is free ​[10:30AM] ttrenka: ​in that case. ​[10:30AM] slightlyoff: ​but we're digressing somewhat ​[10:30AM] ttrenka: ​I would suggest that attaching an event should start off really simply ​[10:30AM] slightlyoff: ​how the general event system works is orthoginal to how DOM-ish events [10:30AM] slightlyoff: are handled ​[10:31AM] ttrenka: ​I would think that Dylan's tag would be the initially used tag [10:31AM] ttrenka: and attach it DOM0 style. [10:31AM] ttrenka: make sure it executes in the context of the widget object. [10:32AM] ttrenka: i.e. if I have a grid [10:32AM] ttrenka: and I define the dojo:event tag in the propertyBag of the grid ​[10:32AM] slightlyoff: ​right ​[10:32AM] ttrenka: ​then i would expect my handler to either execute in the context of the grid object ​[10:32AM] slightlyoff: ​but Mark's whole point was that it's heavyweight ​[10:32AM] ttrenka: ​that syntax isn't heavyweight. [10:32AM] ttrenka: limiting, yes ​[10:32AM] slightlyoff: ​and that you should be able to say something like