mozilla

Revision 78743 of Creating Custom Events That Can Pass Data

  • Revision slug: Creating_Custom_Events_That_Can_Pass_Data
  • Revision title: Creating Custom Events That Can Pass Data
  • Revision id: 78743
  • Created:
  • Creator: Themystic
  • Is current revision? No
  • Comment /* What's In A Name */

Revision Content

Objective

This page describes how to create Custom (C++) Events that can Pass Data. Meaning that you can add extra parameters and query them. One example is lets say you want ff to perform an action whenever something happens, but depending of severity of that event you will react with a different severity. Ok, so that's a great example but work with me.

Requirements

This is no easy task. In order to do this you must be able to do all of the following

What's In A Name

Despite whatever you may have heard in your english class there's a lot in a name. As of Bon Echo Alpha 2, if your do not start with "nsDOM" and their interfaces do not start with "nsIDOM" then you can forget about passing data. You will still be able to throw events but that is it.

Revision Source

<h3 name="Objective"> Objective </h3>
<p>This page describes how to create Custom (C++) Events that can Pass Data. Meaning that you can add extra parameters and query them. One example is lets say you want ff to perform an action whenever <em>something</em> happens, but depending of severity of that event you will react with a different severity. Ok, so that's a great example but work with me.
</p>
<h3 name="Requirements"> Requirements </h3>
<p>This is no easy task. In order to do this you must be able to do all of the following
</p>
<ul><li> <a href="en/Download_Mozilla_Source_Code">Download Mozilla Source Code</a>
</li><li> <a href="en/Build_Documentation">Build Mozilla</a>
</li><li> <a href="en/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">Creating Custom Firefox Extensions with the Mozilla Build System</a>, this is the foundation for everything we'll do. I'll go over some (very little) of it so do this <em>first</em> then come back and do this tutorial.
</li></ul>
<h3 name="What.27s_In_A_Name"> What's In A Name </h3>
<p>Despite whatever you may have heard in your english class there's a lot in a name. As of Bon Echo Alpha 2, if your do not start with "nsDOM" and their interfaces do not start with "nsIDOM" then you can forget about passing data. You will still be able to throw events but that is it.
</p>
Revert to this revision