You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by James Margaris <jm...@nexaweb.com> on 2006/12/06 02:18:31 UTC

MCO loading and IE

I made changes recently to the samples to load MCOs through the XML files and eval() rather than including them in the surrounding HTML file. However there is one caveat here I forgot to mention. There is a different between doing:

function MyClass(){}

and 

MyClass = function(){}

 

In InternetExplorer only the second one works, the first one has some scoping issues and after the eval call the MyClass class will not be defined.

I am changing the samples to reflect this, I neglected to do that when I first made the change.

 

James Margaris


RE: MCO loading and IE

Posted by Coach Wei <co...@nexaweb.com>.
This is a good change - with this change, developers don't need to worry
about importing JavaScript files, which are being loaded automatically
by XAP. 

> -----Original Message-----
> From: James Margaris [mailto:jmargaris@nexaweb.com]
> Sent: Tuesday, December 05, 2006 9:19 PM
> To: xap-dev@incubator.apache.org
> Subject: MCO loading and IE
> 
> I made changes recently to the samples to load MCOs through the XML
files
> and eval() rather than including them in the surrounding HTML file.
> However there is one caveat here I forgot to mention. There is a
different
> between doing:
> 
> function MyClass(){}
> 
> and
> 
> MyClass = function(){}
> 
> 
> 
> In InternetExplorer only the second one works, the first one has some
> scoping issues and after the eval call the MyClass class will not be
> defined.
> 
> I am changing the samples to reflect this, I neglected to do that when
I
> first made the change.
> 
> 
> 
> James Margaris