[Sugar-devel] text.js missing in Sugar Web Framework ?

Lionel Laské lionel at olpc-france.org
Tue Feb 11 16:27:49 EST 2014


Hi all,

I'm playing with the last version of Sugar Web Framework [1]
At the top of the "sugar-web/graphics/activitypalette.js"  [2] file there
is:

       define(["sugar-web/graphics/palette",
             "text!sugar-web/graphics/activitypalette.html"], function
(palette, template) {

        'use strict';

         var activitypalette = {};


The line "text!..." means that it use the "text" require.js plug-in [3].
However, I don't see any trace of the "text.js" into the activity template
[4].
When I launch my activity, I've got this issue:

    xo-74-2e-b8.localdomain - - [09/Feb/2014 14:28:05] "GET
/lib/sugar-web/graphics/icon.js HTTP/1.1" 200 -
    xo-74-2e-b8.localdomain - - [09/Feb/2014 14:28:05] "GET
/lib/sugar-web/graphics/activitypalette.js HTTP/1.1" 200 -
    xo-74-2e-b8.localdomain - - [09/Feb/2014 14:28:05] "GET
/lib/sugar-web/graphics/palette.js HTTP/1.1" 200 -
    1391956085.501851 ERROR root: file
/home/olpc/Activities/TankOp.activity//lib/text.js not found.
    xo-74-2e-b8.localdomain - - [09/Feb/2014 14:28:05] "GET /lib/text.js
HTTP/1.1" 404 -
** Message: console message: http://0.0.0.0:50134/lib/require.js @1765:
Error: Script error
    http://requirejs.org/docs/errors.html#scripterror

    ** Message: console message: http://0.0.0.0:50134/lib/require.js @1765:
Error: Load timeout for modules:
text!sugar-web/graphics/activitypalette.html_unnormalized2
    http://requirejs.org/docs/errors.html#timeout

After a bit of exploring I've understood that it's related to the miss of
the text plug-in (text.js).
When I copy this file in the lib directory, the activity works.

Do I miss something ?
Where the text.js file should come from ?
It should not be into the activity template [4] ?

Thanks for your help.

                Lionel.


[1] https://github.com/sugarlabs/sugar-web
[2]
https://github.com/sugarlabs/sugar-web/blob/master/graphics/activitypalette.js#L1
[3] https://github.com/requirejs/text
[4] https://github.com/sugarlabs/sugar-web-template
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140211/30487a94/attachment.html>


More information about the Sugar-devel mailing list