[Project_owners] methods and fields in XBL bindings

Philip Chee philip at aleytys.pc.my
Sun May 1 02:18:39 EDT 2005


Flashbock uses userContent.css to bind flash objects to our XBL.
We are trying to refactor the XBL but are running into several errors.
However the errors don't ALWAYS occur, only about 50% of the time.

In our test XBL we have the following:

<binding id="flash">
  <implementation>
    <field name="test">
      "test"
    </field>
    <method name="block">
      <parameter name="type" />
      <body>
        <![CDATA[
//...some code to do our bit.
        ]]>
      </body>
    </method>

    <constructor>
        this.block("flash");
    </constructor>
  </implementation>
</binding>

The JS error we get is "this.block is not a function", however putting some
alert boxes I find that SOMETIMES it's undefined, sometimes it works as
expected.  Similarly the "test" field is sometimes undefined and sometimes
returns the expected value.  What am I doing wrong?

Phil

-- 
Philip Chee <philip at aleytys.pc.my>
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.


More information about the Project_owners mailing list