The formatted version of this question is at - 
https://gist.github.com/metaperl/5205183#file-gistfile1-md

But I will paste it inline for those who prefer to read markdown.


In [the Qooxdoo
tutorial]
(http://manual.qooxdoo.org/current/pages/desktop/tutorials/tutorial-part-2.html)
we learn about declaring and then adding a listner to an event.

The declaration is as follows:

```javascript
events :
{
  "reload" : "qx.event.type.Event",
  "post"   : "qx.event.type.Data"
},
```

And the firing of one of the events via a listener is:

```javascript
postButton.addListener("execute", function() {
  this.fireDataEvent("post", textarea.getValue());
}, this);
```

Now, my question centers around `this.fireDataEvent`. The issue here
is that fireDataEvent is a [Verb Subject code
smell](http://c2.com/cgi/wiki?VerbSubject) ... in other words, `this`
should have a `qx.event.type.Data` instance called `this.postEvent`
and

    this.fireDataEvent("post", textarea.getValue())

should have been:

    this.postEvent.fire(textarea.getValue())



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to