Hi!

> I am a qooxdoo newcomer and have a frustrating 
> problem with external script files.
> [...]

First, welcome to qooxdoo!  :-)

Don't worry, looks like you hit a very powerful feature: when generating
the "build" version of your app, qooxdoo analyzes all the JS classes,
detects any references to classes and then excludes the unneeded classes
from the optimized final script file. Think of a parser + compiler +
optimizer + linker. This is done automatically, so you don't have to
fiddle with any manual "require" or "include" statements.

What I assume in your case is that the qx.ui.tabview.* calls are solely
in your external script file, right? So the dependencies to those
classes are never detected.

The question is why you would use such an independent JS file instead of
enhancing the existing main application class or adding new application
classes, respectively. When developing all your code within a regular
qooxdoo "skeleton", you immediately take advantage of all the tooling,
not only build process, but generating API docs, unit testing and much
more. Make sure you follow and understand each step of
http://qooxdoo.org/documentation/0.8/helloworld

Bye,

Andreas

PS: A hack for your problems (that I shouldn't probably mention at all)
could be to add the following line to your app class (do you understand
why?) and regenerate the build:
qx.ui.tabview.Page;
But that's clearly not the way to go. Don't tell anybody  ;-)


> I am including a external script file by using the line
> 
>  <script type="text/javascript" src="script/screen.js"></script>
> 
> in source/index.html.
> 
> screen.js contains the function initScreen(), which includes among 
> others  the statements
> 
>     page[0] = new qx.ui.tabview.Page("Startseite");
>     page[0].setLayout(new qx.ui.layout.Canvas());
> 
> I invoke initScreen() in Application.js and all is fine. But only in
> the source enviroment. 
> 
> I am using ./generate.py build to create a build version of my 
> application. That runs without any error messages. I am using
> the original config.json without changes and then I copy 
> screen.js from /source/scripts to /build/scripts.
> 
> When I run /build/index.html I will get the error:
> 
> qx.ui.tabview has no properties
> /qooxdoo/MyApp/build/script/screen.js
> 
> That's a debug message from FF (Linux).
> FF (Windows) simlarly says:
> qx.ui.tabview is undefined
> 
> Other functions without reference to qx..... are
> fine.
> 
> I examined the type of qx within initScreen() as 
> follows:
> 
> a) alert(typeof qx); 
> 
>  result = object
> 
> b) alert(typeof qx.ui);
> 
>  result = object
> 
> c) alert(typeof qx.ui.tabview);
> 
>  result = undefined
> 
> 
> 
> When I put the function initScreen() directly in
> Application.js then all is fine.
> 
> As I mentioned above the error occurs only
> in the build Version, the source/index.html
> works fine.
> 
> I am clueless. Who knows what is going on?
> 
> I am using the latest version of qooxdoo (0.82)
> 
> I am looking forward for any hints and thank
> everyone who can help.
> 
> Thanks
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 


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

Reply via email to