Hi Alex,

that did the trick. UTF-8 is needed.

So, it now builds the application. But my original problem remains. Firebug still reports:

[Exception... "'Error: Server error 4: Method `5` not found in service class `structure`.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

Any other thought, what I could do?

Thanks
Klaus
 





Alexander Back schrieb:
Hi Klaus,

Klaus-F. Kaal wrote:
Hi Alex,

as you already spent some time on my issue, I hate to admit that I need your further help:
No problem :)


I have written yoursnipplet into a file called "config.json" which is in the root of my app. The qooxdoo environment is on the same directory level as my application (here: D:\xampp\htdocs\qooxdoo).
I've checked your configuration file and I didn't find any problem with it. The only thing which may be wrong with your file is the encoding. In default every file within qooxdoo is saved with UTF-8 encoding. I've attached your config file as UTF-8. Maybe you can use this one and check if it works.

cheers,
  Alex


I have adapted your code to reflect my directory situation as far as I see it. But when I try to build the script, I keep getting this error:

    D:\xampp\htdocs\sfsynchronizer>generate.py build

    ============================================================================
        INITIALIZING: SFSYNCHRONIZER
    ============================================================================
     >>> Configuration: config.json
     >>> Jobs: build
    Traceback (most recent call last):
      File "D:\xampp\htdocs\qooxdoo\tool\bin\generator.py", line 133, in <module>
        main()
      File "D:\xampp\htdocs\qooxdoo\tool\bin\generator.py", line 95, in main
        config = Config(console, options.config)
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\generator\config\Config.py", line
    49, in __init__
        self.__init_fname(data)
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\generator\config\Config.py", line
    68, in __init_fname
        data = ""
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\simplejson\__init__.py", line
    262, in loads
        return _default_decoder.decode(s)
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\simplejson\decoder.py", line 251,
    in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\simplejson\decoder.py", line 268,
    in raw_decode
        obj, end = self._scanner.iterscan(s, **kw).next()
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\simplejson\scanner.py", line 50,
    in iterscan
        rval, next_pos = action(m, context)
      File "D:\xampp\htdocs\qooxdoo\tool\pylib\simplejson\decoder.py", line 127,
    in JSONObject
        raise ValueError(errmsg("Expecting property name", s, end))
    ValueError: Expecting property name: line 2 column 1 (char 2)

    D:\xampp\htdocs\sfsynchronizer>


I am not experienced enough in python to fix that myself. Could you please be so kind and try to find out what problem I have?

Beneth you will find my adapted script.

Thanks a lot
Klaus


--------------------------------- 8< snipp --------------------------------------------------------------
{
 >>    "name"    : "sfSynchronizer",
 >>
 >>    "include" :
 >>    [
 >>      {
 >>        "path" : "../qooxdoo/tool/data/config/application.json"
 >>      }
 >>    ],
 >>
 >>
 >>    "let" :
 >>    {
 >>      "APPLICATION"  : "sfsynchronizer",
 >>      "QOOXDOO_PATH" : "../qooxdoo/framework",
 >>      "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
 >>      "CACHE"        : "../cache",
 >>      "QXTHEME"      : "qx.theme.Modern",
 >>      "LOCALES"      : ["en", "de", "es", "fr", "it", "sv"],
 >>      "TEST_INCLUDE"   : "${APPLICATION}.*",
 >>      "ROOT"         : ".",
 >>      "BUILD_PATH"   : "${ROOT}/build"
 >>    },
 >>
 >>    "jobs" :
 >>    {
 >>      "common" :
 >>      {
 >>        "library" :
 >>        [
 >>          {
 >>            "manifest" : "${QOOXDOO_PATH}/Manifest.json",
 >>            "uri"      : "${QOOXDOO_URI}"
 >>          },
 >>
 >>          {
 >>            "manifest" : "${ROOT}/Manifest.json",
 >>            "uri"      : ".."
 >>          }
 >>        ],
 >>
 >>        "include" :
 >>        [
 >>          "${APPLICATION}.Application",
 >>          "${QXTHEME}"
 >>        ],
 >>
 >>        "cache" :
 >>        {
 >>          "compile" :  "${CACHE}"
 >>        },
 >>
 >>        "settings" :
 >>        {
 >>          "qx.version"     : "${QXVERSION}",
 >>          "qx.theme"       : "${QXTHEME}",
 >>          "qx.application" : "${APPLICATION}.Application"
 >>        }
 >>      },
 >>
 >>      // -- build jobs ---------------------------------------------------
 >>
 >>      "build-myscript" :
 >>      {
 >>        "extend" : ["common"],
 >>
 >>        "variants" :
 >>        {
 >>          "qx.debug" : ["off"]
 >>        },
 >>
 >>        "compile-dist" :
 >>        {
 >>          "target" : "${BUILD_PATH}",
 >>          "file" : "${BUILD_PATH}/script/${APPLICATION}.js",
 >>          "uri"  : "script/${APPLICATION}.js",
 >>          "root" : "${BUILD_PATH}",
 >>          "format" : "on",
 >>          "locales"  : "${LOCALES}",
 >>          "optimize" : ["basecalls"]
 >>        }
 >>      },
 >>
 >>
 >>      "build-files" :
 >>      {
 >>        "extend" : ["common"],
 >>
 >>        "copy-files" :
 >>        {
 >>          "files" :
 >>          [
 >>            "index.html"
 >>          ],
 >>
 >>          "target" : "${BUILD_PATH}"
 >>        }
 >>      },
 >>
 >>
 >>      "build-resources":
 >>      {
 >>        "extend" : ["common"],
 >>
 >>        "copy-resources" :
 >>        {
 >>          "target"          : "${BUILD_PATH}",
 >>          "resource-filter" : true
 >>        }
 >>      },
 >>
 >>
 >>      "mybuild" :
 >>      {
 >>        "run" :
 >>        [
 >>          "build-resources",
 >>          "build-myscript",
 >>          "build-files"
 >>        ]
 >>      }
 >>    }
 >> }
--------------------------------------------------------------- 8< snipp -----------------------------------------------------------

--------------------------------------------------------------------------------

*
*



Alexander Back schrieb:
Hi Klaus,

Klaus-F. Kaal wrote:
 
Hi Alex,

thank you for your valuable hints.

I am using the current version - I believe.

1. Where can I find the version no of my qooxdoo? Is this version no also "built" into the applications I write? So that I can read that and display it?
   
You can use the method call

--snip--
qx.core.Setting.get("qx.version")
--snip--

inside your e.g. FireBug console to let you show the version of qooxdoo you use. If it says "0.8" you are using the current SDK and if the result is "0.8.1-pre" you are using the trunk version.

 
2. You are telling me that I should modify the "OPTIMIZE" macro value. My trouble: I checked now many files, but could not find it. Also the Windows search (which is bad, I know) did not give result.
   
If you have no such macro you're probably using the 0.8 SDK. As I already mentioned this macro is only available within the trunk version and later on will be part of the upcoming 0.8.1 release.

So if you're using 0.8 you have to follow the steps I explained as second solution (creating own build-jobs by defining them in your "config.json")

If you have further questions, don't hesitate to ask :)

cheers,
   Alex

 
Alexander Back schrieb:
   
Hi Klaus,

Klaus-F. Kaal wrote:
       
Hi,

I am having a project which runs fine when I run it under "source", but throws exception, when compiled into the /build directory. Then I get this error message in firebug:

    [Exception... "'Error: Server error 4: Method `5` not found in service class
    `structure`.' when calling method: [nsIDOMEventListener::handleEvent]"
    nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location:
    "<unknown>" data: no]


The strange thing: it obviously works with the class called "Structure" and I cannot see, where I would call something like "5". I have no idea how to debug this.
           
This is due several optimizations which are used for the "build" version. There are two ways to solve this. If you are using the current trunk you can easily modify the "OPTIMIZE" macro value.

--snip--
let : {
    ...
    "OPTIMIZE"     : ["basecalls", "variables", "privates", "strings"],
    ...
}
--snip--
Just delete the "variables" out of the list.

If you use the 0.8 version you have to create your own build job to achieve this, because overwriting/merging jobs will be available with the upcoming 0.8.1 release.

This setup works for me (at least with the "feedreader" application).

--snip--
{
   "name"    : "Feedreader config.json",

   "include" :
   [
     {
       "path" : "../../tool/data/config/application.json"
     }
   ],


   "let" :
   {
     "APPLICATION"  : "feedreader",
     "QOOXDOO_PATH" : "../../framework",
     "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
     "CACHE"        : "../../cache",
     "QXTHEME"      : "qx.theme.Modern",
     "LOCALES"      : ["en", "de", "es", "fr", "it", "sv"],
     "TEST_INCLUDE"   : "${APPLICATION}.*",
     "ROOT"         : ".",
     "BUILD_PATH"   : "${ROOT}/build"
   },

   "jobs" :
   {
     "common" :
     {
       "library" :
       [
         {
           "manifest" : "${QOOXDOO_PATH}/Manifest.json",
           "uri"      : "${QOOXDOO_URI}"
         },

         {
           "manifest" : "${ROOT}/Manifest.json",
           "uri"      : ".."
         }
       ],

       "include" :
       [
         "${APPLICATION}.Application",
         "${QXTHEME}"
       ],

       "cache" :
       {
         "compile" :  "${CACHE}"
       },

       "settings" :
       {
         "qx.version"     : "${QXVERSION}",
         "qx.theme"       : "${QXTHEME}",
         "qx.application" : "${APPLICATION}.Application"
       }
     },

     // -- build jobs ---------------------------------------------------

     "build-myscript" :
     {
       "extend" : ["common"],

       "variants" :
       {
         "qx.debug" : ["off"]
       },

       "compile-dist" :
       {
         "target" : "${BUILD_PATH}",
         "file" : "${BUILD_PATH}/script/${APPLICATION}.js",
         "uri"  : "script/${APPLICATION}.js",
         "root" : "${BUILD_PATH}",
         "format" : "on",
         "locales"  : "${LOCALES}",
         "optimize" : ["basecalls"]
       }
     },


     "build-files" :
     {
       "extend" : ["common"],

       "copy-files" :
       {
         "files" :
         [
           "index.html"
         ],

         "target" : "${BUILD_PATH}"
       }
     },


     "build-resources":
     {
       "extend" : ["common"],

       "copy-resources" :
       {
         "target"          : "${BUILD_PATH}",
         "resource-filter" : true
       }
     },


     "mybuild" :
     {
       "run" :
       [
         "build-resources",
         "build-myscript",
         "build-files"
       ]
     }
   }
}
--snip--

cheers,
   Alex

------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url="">

_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to