On May 27, 8:18 pm, Carey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Does anybody use mochikit in xul? I have seen references that indicate
> people do but I haven't seen any examples.
Hi Carey,
We use MochiKit and SimpleTest extensively at Mozilla to drive unit
tests for all sorts of things, including XUL.
>
> I am having trouble getting mochikit (current svn) to load for use in
> a xul page. When I try to use it I get eg
> MochiKit.Visual has no properties.
The script loader works a little differently for XUL than HTML, so the
trick MochiKit.js uses to load JS files doesn't work. We just use a
packed version that contains all the files in a condensed form. You
can also include each file one-by-one in script elements.
Also keep in mind that MochiKit.DOM expects HTML elements to be in the
default namespace (as it should, since it is primarily used on the
Web). So, if you want to use the visual effects stuff, you'll need to
write your XUL files like so:
<xul:window xmlns:xul="...">
<body xmlns="http://www.w3.org/1999/xhtml">
....
</body>
</xul:window>
-Rob
<http://blog.mozilla.com/rob-sayre>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---