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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Goto Forum:
Current Time: Sun Oct 13 23:00:26 GMT 2024
Powered by FUDForum. Page generated in 0.03739 seconds
|