Hello,
It seems I had to use that class cvsiwagui.ModuleOne in
cvsiwagui.Application. I thought that It would load it and I could use it from
an eval'ed string. But it seems that since ModuleOne was not used Application,
generate.py completely ignored the ModuleOne.js file.
In fact, I did try to use the ModuleOne class in Application, but before
requesting the part. I hoped that that would force generate.py to add ModuleOne
to the boot part, since boot needs it. But instead it generated the app and
throwed a runtime error saying that ModuleOne is not a constructor (the class
was not declared because was not embeded in the boot part).
So, the lesson for me was: Reffer to the loaded part(Class) in the boot
part (after loading it) if you don't want generate.py to ignore that
part(Class).
I guess that if I wanted to use the class from an eval'ed string, I'd have
to reffer to that class in some way even if I do a simple
if(cvsiwagui.ModuleOne == undefined) ... right? ^.^
Thanks,
Tancredi-Paul Grozav
În Joi, 9 Ianuarie 2014 14:05:03, tedi tedi <[email protected]> a scris:
Is there any working complete example of how to create qooxdoo parts --
something like a zip of a project, or a step-by step tutorial ?
Thanks!
În Miercuri, 8 Ianuarie 2014 21:35:40, tedi tedi <[email protected]> a scris:
I found this
http://stackoverflow.com/questions/13211499/qooxdoo-how-to-force-generate-py-to-include-a-part
but it does not help ... Could someone help me ?
Thank you!
În Miercuri, 8 Ianuarie 2014 17:49:10, tedi tedi <[email protected]> a scris:
Hello,
I get this error when I try to generate my app: "Part #modunu is ignored in
current configuration"
This is config.json:
{
"name" : "CVSIWAGUI",
"include" :
[
{
"path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
}
],
"export" :
[
"api",
"api-data",
"build",
"clean",
"distclean",
"dependencies",
"fix",
"info",
"inspector",
"lint",
"migration",
"pretty",
"profiling",
"source",
"source-all",
"source-hybrid",
"source-server",
"source-server-reload",
"source-httpd-config",
"simulation-build",
"simulation-run",
"test",
"test-source",
"translation",
"validate-config",
"validate-manifest",
"watch"
],
"default-job" : "source-hybrid",
"let" :
{
"APPLICATION" : "cvsiwagui",
"QOOXDOO_PATH" : "../../../../../programs/qooxdoo-3.5-sdk",
"QXTHEME" : "cvsiwagui.theme.Theme",
"API_EXCLUDE" : ["qx.test.*", "${APPLICATION}.theme.*",
"${APPLICATION}.test.*", "${APPLICATION}.simulation.*"],
"LOCALES" : [ "en"
],
"CACHE" : "${TMPDIR}/qx${QOOXDOO_VERSION}/cache",
"ROOT" : "."
},
// You only need to edit the remainder of this file, if you want to
customize
// specific jobs, or add own job definitions.
"jobs" :
{
// Uncomment the following entry to add a contrib or library to your
// project; make sure to adapt the path to the Manifest.json; if you are
// using a contrib: library, it will be downloaded
into the path specified
// by the 'cache/downloads' config key
/*
"libraries" :
{
"library" :
[
{
"manifest" :
"contrib://SkeletonApplication/trunk/Manifest.json"
}
]
}
*/
// If you want to tweak a job setting, see the following
sample where
// the "format" feature of the "build-script" job is overridden.
// To see a list of available jobs, invoke 'generate.py x'.
/*
,"build-script" :
{
"compile-options" :
{
"code" :
{
"format" : false
}
}
}
*/
// Parts
"my-parts-config":
{
"packages" :
{
"parts" :
{
"boot" :
{
"include" : [ "${QXTHEME}", "cvsiwagui.Application" ]
}
,"modunu" :
{
"include" : [ "cvsiwagui.ModuleOne" ]
}
}
}
}
,"source" :
{
"extend" : [ "my-parts-config" ]
}
,"build" :
{
"extend" : [
"my-parts-config" ]
}
}
}
// ================================== END config.json =======================
///
This is Application.js:
qx.Class.define("cvsiwagui.Application",
{
extend : qx.application.Standalone,
/*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
members :
{
/**
* This method contains the initial application code and gets called
* during startup of the application
*
* @lint ignoreDeprecated(alert)
*/
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Environment.get("qx.debug"))
{
// support native logging capabilities, e.g. Firebug for
Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle
visibility
qx.log.appender.Console;
}
/*
-------------------------------------------------------------------------
Below is your actual application code...
-------------------------------------------------------------------------
*/
this.getRoot().setBackgroundColor("#ffffff");
//
var x = new cvsiwagui.ModuleOne();
var btn = new qx.ui.form.Button("Load ModuleOne");
btn.addListener("execute", function(e){
qx.io.PartLoader.require(["modunu"], function()
{
alert("moduleLoaded");
}, this);
}, this);
this.getRoot().add(btn);
}
}
});
// ================================== END Application.js
======================= ///
This is ModuleOne.js:
qx.Class.define("cvsiwagui.ModuleOne",
{
extend : qx.core.Object,
construct: function(){
alert("Module One loaded");
},
members :
{
f: function(){
var a = "1982nalb8";
}
}
});
// ================================== END ModuleOne.js =======================
///
I am running this command:
./generate.py clean && ./generate.py build
And I am getting this output:
----------------------------------------------------------------------------
Initializing: CVSIWAGUI
----------------------------------------------------------------------------
>>> Processing configuration
- Warning: ! Shadowing job "source" with local one
- Warning: ! Shadowing job "build" with local one
----------------------------------------------------------------------------
Executing: clean
----------------------------------------------------------------------------
>>> Cleaning up files...
- Cleaning up build
- Cleaning up source
>>> Done
(0m00.00)
----------------------------------------------------------------------------
Initializing: CVSIWAGUI
----------------------------------------------------------------------------
>>> Processing configuration
- Warning: ! Shadowing job "source" with local one
- Warning: ! Shadowing job "build" with local one
----------------------------------------------------------------------------
Executing: build::build-resources
----------------------------------------------------------------------------
>>> Scanning libraries
>>> Collecting classes
- Sorting 251 classes
>>> Copying resources...
>>> Done (0m01.23)
----------------------------------------------------------------------------
Executing:
build::build-script
----------------------------------------------------------------------------
>>> Scanning libraries
>>> Collecting classes
- Sorting 247 classes
>>> Assembling parts
- part boot
- part modunu
- Part #modunu is ignored in current configuration
>>> Collapsing parts
>>> Verifying parts
>>> Generate application
- Processing 2 locales
- Generate packages
- Generate loader script
>>> Done (0m01.04)
----------------------------------------------------------------------------
Executing: build::build-files
----------------------------------------------------------------------------
>>> Copying application files...
>>> Done (0m00.00)
// ================================== END of command output
======================= ///
Any help would be appreciated. I am using qooxdoo 3.5.
Thank you!
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application
performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel