Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » custom widget with external JS
custom widget with external JS [message #45123] Tue, 04 September 2007 17:51 Go to next message
Eclipse UserFriend
Originally posted by: andrew_james_macdonald.yahoo.com

Hello,
I'm trying to build a custom widget which uses an external library
(mootools). I have some questions/problems and am hoping you can
provide me with some answers.

1) I notice in Firebug that my mootools.js file gets loaded after the
RAP page which contains my custom widget JS code. As my widget JS code
uses mootools classes, won't the mootools library need to be loaded
beforehand?

2) I realize this may be beyond the scope of this list, but the mootools
library seems to be interfering with the qooxdoo library, as when I
include it I get the following errors which prevent the RAP workbench
from loading:

this.$$method[$r] has no properties
qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
rap (line 36)

this.setEnabled is not a function
qx.Class.define($[1584],{extend:qx.core.Target,construct:fun ction($0){arguments....
rap (line 105)

this.$$method[$r] has no properties
qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
rap (line 36)


I've been looking at the Google Maps example, as it seems to avoid these
two problems, but am having little luck in gleaning any help from it.

Thanks in advance,
Andrew
Re: custom widget with external JS [message #45242 is a reply to message #45123] Tue, 04 September 2007 19:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: b.muskalla.gmx.net

Hi Andrew,

Andrew wrote:
> Hello,
> I'm trying to build a custom widget which uses an external library
> (mootools). I have some questions/problems and am hoping you can
> provide me with some answers.
>
> 1) I notice in Firebug that my mootools.js file gets loaded after the
> RAP page which contains my custom widget JS code. As my widget JS code
> uses mootools classes, won't the mootools library need to be loaded
> beforehand?
How did you register your mootools.js?
Time of downloading the stuff does not mean that it's really parsed in
that order. Do you encounter any problems in this area?

>
> 2) I realize this may be beyond the scope of this list, but the mootools
> library seems to be interfering with the qooxdoo library, as when I
> include it I get the following errors which prevent the RAP workbench
> from loading:
>
> this.$$method[$r] has no properties
> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>
> rap (line 36)
>
> this.setEnabled is not a function
> qx.Class.define($[1584],{extend:qx.core.Target,construct:fun ction($0){arguments....
>
> rap (line 105)
>
> this.$$method[$r] has no properties
> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>
> rap (line 36)

I think this is caused by the namespaces both of the frameworks are
using. See "JS Libraries in RAP" in this newsgroup.
>
>
> I've been looking at the Google Maps example, as it seems to avoid these
> two problems, but am having little luck in gleaning any help from it.
>
> Thanks in advance,
> Andrew

Greets
Benny
Re: custom widget with external JS [message #45304 is a reply to message #45242] Tue, 04 September 2007 21:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrew_james_macdonald.yahoo.com

Benjamin Muskalla wrote:
> Hi Andrew,
>
> Andrew wrote:
>> Hello,
>> I'm trying to build a custom widget which uses an external library
>> (mootools). I have some questions/problems and am hoping you can
>> provide me with some answers.
>>
>> 1) I notice in Firebug that my mootools.js file gets loaded after the
>> RAP page which contains my custom widget JS code. As my widget JS
>> code uses mootools classes, won't the mootools library need to be
>> loaded beforehand?
> How did you register your mootools.js?
> Time of downloading the stuff does not mean that it's really parsed in
> that order. Do you encounter any problems in this area?
>

I'm registering it by extending the
"org.eclipse.equinox.http.registry.resources" point. It seems like the
file is getting loaded properly. I can't tell if my widget can access
the mootools classes, since the mootools library stops RAP from loading
(probably due to the namespace conflict you pointed out below).
However, looking at the source code for the HTML page, I see that all
the qooxdoo and custom widget code is placed prior to the loading of
external JS libraries, so even if I could resolve the namespace issue,
it seems like the widget code wouldn't have access to the mootools
classes...

Thanks for the quick reply,
Andrew

>>
>> 2) I realize this may be beyond the scope of this list, but the
>> mootools library seems to be interfering with the qooxdoo library, as
>> when I include it I get the following errors which prevent the RAP
>> workbench from loading:
>>
>> this.$$method[$r] has no properties
>> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>>
>> rap (line 36)
>>
>> this.setEnabled is not a function
>> qx.Class.define($[1584],{extend:qx.core.Target,construct:fun ction($0){arguments....
>>
>> rap (line 105)
>>
>> this.$$method[$r] has no properties
>> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>>
>> rap (line 36)
>
> I think this is caused by the namespaces both of the frameworks are
> using. See "JS Libraries in RAP" in this newsgroup.
>>
>>
>> I've been looking at the Google Maps example, as it seems to avoid
>> these two problems, but am having little luck in gleaning any help
>> from it.
>>
>> Thanks in advance,
>> Andrew
>
> Greets
> Benny
Re: custom widget with external JS [message #45422 is a reply to message #45304] Wed, 05 September 2007 14:35 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

seems as if you are working against the M6 build. The loading order problem
is fixed in the meanwhile (the demo did not work either, sorry...). If you
switch to the latest I-Build or CVS the loading order should be correct.

Ciao
Frank


"Andrew" <andrew_james_macdonald@yahoo.com> schrieb im Newsbeitrag
news:fbkiek$8hc$1@build.eclipse.org...
> Benjamin Muskalla wrote:
>> Hi Andrew,
>>
>> Andrew wrote:
>>> Hello,
>>> I'm trying to build a custom widget which uses an external library
>>> (mootools). I have some questions/problems and am hoping you can
>>> provide me with some answers.
>>>
>>> 1) I notice in Firebug that my mootools.js file gets loaded after the
>>> RAP page which contains my custom widget JS code. As my widget JS code
>>> uses mootools classes, won't the mootools library need to be loaded
>>> beforehand?
>> How did you register your mootools.js?
>> Time of downloading the stuff does not mean that it's really parsed in
>> that order. Do you encounter any problems in this area?
>>
>
> I'm registering it by extending the
> "org.eclipse.equinox.http.registry.resources" point. It seems like the
> file is getting loaded properly. I can't tell if my widget can access the
> mootools classes, since the mootools library stops RAP from loading
> (probably due to the namespace conflict you pointed out below). However,
> looking at the source code for the HTML page, I see that all the qooxdoo
> and custom widget code is placed prior to the loading of external JS
> libraries, so even if I could resolve the namespace issue, it seems like
> the widget code wouldn't have access to the mootools classes...
>
> Thanks for the quick reply,
> Andrew
>
>>>
>>> 2) I realize this may be beyond the scope of this list, but the mootools
>>> library seems to be interfering with the qooxdoo library, as when I
>>> include it I get the following errors which prevent the RAP workbench
>>> from loading:
>>>
>>> this.$$method[$r] has no properties
>>> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>>> rap (line 36)
>>>
>>> this.setEnabled is not a function
>>> qx.Class.define($[1584],{extend:qx.core.Target,construct:fun ction($0){arguments....
>>> rap (line 105)
>>>
>>> this.$$method[$r] has no properties
>>> qx.Class.define($[1604],{statics:{__checks:{"Boolean":$[1677], "String":$[1118],"...
>>> rap (line 36)
>>
>> I think this is caused by the namespaces both of the frameworks are
>> using. See "JS Libraries in RAP" in this newsgroup.
>>>
>>>
>>> I've been looking at the Google Maps example, as it seems to avoid these
>>> two problems, but am having little luck in gleaning any help from it.
>>>
>>> Thanks in advance,
>>> Andrew
>>
>> Greets
>> Benny
Previous Topic:M6 blocking Dialog and Virtual table
Next Topic:LCA class for custom widgets - JSON?
Goto Forum:
  


Current Time: Mon May 13 06:37:13 GMT 2024

Powered by FUDForum. Page generated in 0.03546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top