v0.8 - generate.py source to include even qx classes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

v0.8 - generate.py source to include even qx classes

Amit Rana
Hi,

I have a query regarding v0.8 "generate.py source" command:

In v0.7, if I added any Qooxdoo class like qx.ui.form.Button etc. in my
application class, I did not have to do "make source" again because the
.js file referred by the index.html included all the qx library classes
(even if not used in my code).

But, in v0.8, this is not the case. Apparently, the custom.js file
includes only those qx classes from the library, which are being used in
the code. So, if I add a new classs (say Hbox) in my application class,
I have to run the "generate.py source" again. So, its not just a simple
save-and-browser-refresh feature anymore.
I know this leads to better optimization but its very time consuming
while developing an application.

How can I modify my json files to include all the qx library classes, so
that I get back to just browser refresh functionality (as in v0.7). And,
in the end, when all my code is ready, I can again change my JSON
settings and get back in optimized mode in source (and build to).

Note: I came to know this when I did the migration
(http://qooxdoo.org/documentation/0.8/migration_guide_from_07) and going
from Checkpoint 2 to checkpoint 3 worked only when I did a generate.py
source again (not mentioned on the page).

Please clarify if I am correct or not ?

--
Amit Rana

SpagoBI Developer
Research & Innovation Division
Engineering Ingegneria Informatica S.p.A.
Strada 2, Palazzo D3 - 20090,
Milanofiori Assago (Milan) - Italy
Mobile: +39-3276115975

www.eng.it                    
www.spagoworld.org


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Jonathan Weiß
Hello Amit!

> Note: I came to know this when I did the migration
> (http://qooxdoo.org/documentation/0.8/migration_guide_from_07) and  
> going
> from Checkpoint 2 to checkpoint 3 worked only when I did a generate.py
> source again (not mentioned on the page).


Thanks for your input - you are right: you have to run generate.py  
source again since some classes have been added in "Adjust the  
application class". I have changed the documentation.

Cheers,
Jonathan

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Jonathan Weiß
Framework Engineer

Blog - LinkedIn - XING
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

thron7
In reply to this post by Amit Rana
Amit,

I feel your original question has not been addressed properly.

Amit Rana wrote:
> How can I modify my json files to include all the qx library classes, so
> that I get back to just browser refresh functionality (as in v0.7). And,
> in the end, when all my code is ready, I can again change my JSON
> settings and get back in optimized mode in source (and build to).
>
>  

Basically, you have to inject a modified "include" key into your
"source" build.

One way of doing this is by adding the following job to your config:

"source-all" :
{
  "extend" : ["source"]

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

This will make sure both all of your own classes and all framework
classes are included in the source version. Now run 'generate.py
source-all' and you should get the expected result. You can always run
'generate.py source' to re-generate the default source version. Both
jobs can live side-by-side in your config, whithout disturbing each other.

HTH,
Thomas


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Amit Rana
thron7 wrote:

> Amit,
>
> I feel your original question has not been addressed properly.
>
> Amit Rana wrote:
>  
>> How can I modify my json files to include all the qx library classes, so
>> that I get back to just browser refresh functionality (as in v0.7). And,
>> in the end, when all my code is ready, I can again change my JSON
>> settings and get back in optimized mode in source (and build to).
>>
>>  
>>    
>
> Basically, you have to inject a modified "include" key into your
> "source" build.
>
> One way of doing this is by adding the following job to your config:
>
> "source-all" :
> {
>   "extend" : ["source"]
>
>   "include" :
>   [
>     "${QXTHEME}",
>     "${APPLICATION}.*"
>     "qx.*"
>   ]
> }
>
> This will make sure both all of your own classes and all framework
> classes are included in the source version. Now run 'generate.py
> source-all' and you should get the expected result. You can always run
> 'generate.py source' to re-generate the default source version. Both
> jobs can live side-by-side in your config, whithout disturbing each other.
>
> HTH,
> Thomas
>  
Thanks Thomas,
I was looking for this thing only. I will try it out and tell the results.

Regards

--
Amit Rana
www.eng.it                    
www.spagoworld.org


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Amit Rana
Amit Rana wrote:
thron7 wrote:
  
Amit,

I feel your original question has not been addressed properly.

Amit Rana wrote:
  
    
How can I modify my json files to include all the qx library classes, so 
that I get back to just browser refresh functionality (as in v0.7). And, 
in the end, when all my code is ready, I can again change my JSON 
settings and get back in optimized mode in source (and build to).

  
    
      
Basically, you have to inject a modified "include" key into your 
"source" build.

One way of doing this is by adding the following job to your config:

"source-all" :
{
  "extend" : ["source"]

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

This will make sure both all of your own classes and all framework 
classes are included in the source version. Now run 'generate.py 
source-all' and you should get the expected result. You can always run 
'generate.py source' to re-generate the default source version. Both 
jobs can live side-by-side in your config, whithout disturbing each other.

HTH,
Thomas
  
    
Thanks Thomas,
I was looking for this thing only. I will try it out and tell the results.

Regards

  
Hi,

I tried to do the above thing, but it still doesn't include all the qooxdoo classes (as example, i searched qx/util/fsm and qx/io/remote/Rpc.js which are there in v0.7 custom.js and not used in my application but not in the new one. But, strangely, it includes all the other classes in qx/io/remote). So, I am more confused now :-(

Here is a snippet of my config.json :

{
  "name"    : "spagobi",

  "include" :
  [
    {
      "path" : "../../js/qooxdoo-0.8/tool/data/config/application.json",
      "as"   : "appconf"
    }
  ],

  "let" :
  {
    "APPLICATION"  : "spagobi",
    "QOOXDOO_PATH" : "../../js/qooxdoo-0.8/framework",
    "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
    "QXTHEME"      : "qx.theme.Modern",
    "LOCALES"      : [ "en", "de", "tr", "it", "es", "sv", "ru" ],
    "ROOT"         : "."
  },

  "jobs" :
  {
    "common" :
    {
      "include" :
      [
        "spagobi.app.Chiron",
        "${QXTHEME}",
        "qx.legacy.theme.ClassicRoyale"
      ],
      "settings" :
      {
        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale",
        "qx.application"  : "spagobi.app.Chiron"
      }
    },
 .....
  "source" :
    {
      "extend" : ["common", "appconf::source"],

      "settings" :
      {
        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale"
      }
    },

    "source-all" :
    {
      "extend" : ["source"]
   
      "include" :
      [
        "spagobi.app.Chiron",
        "${QXTHEME}",
        "qx.legacy.theme.ClassicRoyale",
        "qx.*"
      ]
    },
    ....
 }
}


-- 
Amit Rana
www.eng.it                    
www.spagoworld.org

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Amit Rana
Hi,
 I am sorry. Just wanted to tell that it worked. There was some typo error in my config which was preventing this earlier.

Thanks a ton to Thomas.

regards
Amit

Amit Rana wrote:
Amit Rana wrote:
thron7 wrote:
  
Amit,

I feel your original question has not been addressed properly.

Amit Rana wrote:
  
    
How can I modify my json files to include all the qx library classes, so 
that I get back to just browser refresh functionality (as in v0.7). And, 
in the end, when all my code is ready, I can again change my JSON 
settings and get back in optimized mode in source (and build to).

  
    
      
Basically, you have to inject a modified "include" key into your 
"source" build.

One way of doing this is by adding the following job to your config:

"source-all" :
{
  "extend" : ["source"]

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

This will make sure both all of your own classes and all framework 
classes are included in the source version. Now run 'generate.py 
source-all' and you should get the expected result. You can always run 
'generate.py source' to re-generate the default source version. Both 
jobs can live side-by-side in your config, whithout disturbing each other.

HTH,
Thomas
  
    
Thanks Thomas,
I was looking for this thing only. I will try it out and tell the results.

Regards

  
Hi,

I tried to do the above thing, but it still doesn't include all the qooxdoo classes (as example, i searched qx/util/fsm and qx/io/remote/Rpc.js which are there in v0.7 custom.js and not used in my application but not in the new one. But, strangely, it includes all the other classes in qx/io/remote). So, I am more confused now :-(

Here is a snippet of my config.json :

{
  "name"    : "spagobi",

  "include" :
  [
    {
      "path" : "../../js/qooxdoo-0.8/tool/data/config/application.json",
      "as"   : "appconf"
    }
  ],

  "let" :
  {
    "APPLICATION"  : "spagobi",
    "QOOXDOO_PATH" : "../../js/qooxdoo-0.8/framework",
    "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
    "QXTHEME"      : "qx.theme.Modern",
    "LOCALES"      : [ "en", "de", "tr", "it", "es", "sv", "ru" ],
    "ROOT"         : "."
  },

  "jobs" :
  {
    "common" :
    {
      "include" :
      [
        "spagobi.app.Chiron",
        "${QXTHEME}",
        "qx.legacy.theme.ClassicRoyale"
      ],
      "settings" :
      {
        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale",
        "qx.application"  : "spagobi.app.Chiron"
      }
    },
 .....
  "source" :
    {
      "extend" : ["common", "appconf::source"],

      "settings" :
      {
        "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale"
      }
    },

    "source-all" :
    {
      "extend" : ["source"]
   
      "include" :
      [
        "spagobi.app.Chiron",
        "${QXTHEME}",
        "qx.legacy.theme.ClassicRoyale",
        "qx.*"
      ]
    },
    ....
 }
}

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Amit Rana
Hi,

I have got the results but there is only 1 small bug. Some classes get
included multiple times giving errors in Firebug as :

Setting "qx.tableResizeDebug" is already defined!
Mixin "qx.core.MAssert" is already included into Class
"qx.dev.unit.TestCase" by class: qx.core.Object!
Mixin "qx.ui.core.MExecutable" is already included into Class
"qx.ui.toolbar.RadioButton" by class: qx.ui.toolbar.RadioButton!

Is there any setting like exclude in the config.json file (similar to
include), so that I can tell my source job to exclude the above classes
(and they will get automatically included because of the dependency)

Regards
Amit

Amit Rana wrote:

> Hi,
>  I am sorry. Just wanted to tell that it worked. There was some typo
> error in my config which was preventing this earlier.
>
> Thanks a ton to Thomas.
>
> regards
> Amit
>
> Amit Rana wrote:
>> Amit Rana wrote:
>>> thron7 wrote:
>>>  
>>>> Amit,
>>>>
>>>> I feel your original question has not been addressed properly.
>>>>
>>>> Amit Rana wrote:
>>>>  
>>>>    
>>>>> How can I modify my json files to include all the qx library classes, so
>>>>> that I get back to just browser refresh functionality (as in v0.7). And,
>>>>> in the end, when all my code is ready, I can again change my JSON
>>>>> settings and get back in optimized mode in source (and build to).
>>>>>
>>>>>  
>>>>>    
>>>>>      
>>>> Basically, you have to inject a modified "include" key into your
>>>> "source" build.
>>>>
>>>> One way of doing this is by adding the following job to your config:
>>>>
>>>> "source-all" :
>>>> {
>>>>   "extend" : ["source"]
>>>>
>>>>   "include" :
>>>>   [
>>>>     "${QXTHEME}",
>>>>     "${APPLICATION}.*"
>>>>     "qx.*"
>>>>   ]
>>>> }
>>>>
>>>> This will make sure both all of your own classes and all framework
>>>> classes are included in the source version. Now run 'generate.py
>>>> source-all' and you should get the expected result. You can always run
>>>> 'generate.py source' to re-generate the default source version. Both
>>>> jobs can live side-by-side in your config, whithout disturbing each other.
>>>>
>>>> HTH,
>>>> Thomas
>>>>  
>>>>    
>>> Thanks Thomas,
>>> I was looking for this thing only. I will try it out and tell the results.
>>>
>>> Regards
>>>
>>>  
>> Hi,
>>
>> I tried to do the above thing, but it still doesn't include all the
>> qooxdoo classes (as example, i searched qx/util/fsm and
>> qx/io/remote/Rpc.js which are there in v0.7 custom.js and not used in
>> my application but not in the new one. But, strangely, it includes
>> all the other classes in qx/io/remote). So, I am more confused now :-(
>>
>> Here is a snippet of my config.json :
>>
>> {
>>   "name"    : "spagobi",
>>
>>   "include" :
>>   [
>>     {
>>       "path" : "../../js/qooxdoo-0.8/tool/data/config/application.json",
>>       "as"   : "appconf"
>>     }
>>   ],
>>
>>   "let" :
>>   {
>>     "APPLICATION"  : "spagobi",
>>     "QOOXDOO_PATH" : "../../js/qooxdoo-0.8/framework",
>>     "QOOXDOO_URI"  : "../${QOOXDOO_PATH}",
>>     "QXTHEME"      : "qx.theme.Modern",
>>     "LOCALES"      : [ "en", "de", "tr", "it", "es", "sv", "ru" ],
>>     "ROOT"         : "."
>>   },
>>
>>   "jobs" :
>>   {
>>     "common" :
>>     {
>>       "include" :
>>       [
>>         "spagobi.app.Chiron",
>>         "${QXTHEME}",
>>         "qx.legacy.theme.ClassicRoyale"
>>       ],
>>       "settings" :
>>       {
>>         "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale",
>>         "qx.application"  : "spagobi.app.Chiron"
>>       }
>>     },
>>  .....
>>   "source" :
>>     {
>>       "extend" : ["common", "appconf::source"],
>>
>>       "settings" :
>>       {
>>         "qx.legacy.theme" : "qx.legacy.theme.ClassicRoyale"
>>       }
>>     },
>>
>>     "source-all" :
>>     {
>>       "extend" : ["source"]
>>    
>>       "include" :
>>       [
>>         "spagobi.app.Chiron",
>>         "${QXTHEME}",
>>         "qx.legacy.theme.ClassicRoyale",
>>         "qx.*"
>>       ]
>>     },
>>     ....
>>  }
>> }

--
Amit Rana

SpagoBI Developer
Research & Innovation Division
Engineering Ingegneria Informatica S.p.A.
Strada 2, Palazzo D3 - 20090,
Milanofiori Assago (Milan) - Italy
Mobile: +39-3276115975

www.eng.it                    
www.spagoworld.org


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

thron7
Hi Amit,


> I have got the results but there is only 1 small bug. Some classes get
> included multiple times giving errors in Firebug as :
>
> Setting "qx.tableResizeDebug" is already defined!
>  

This is just an annoyance you don't have to worry about (it has already
been fixed in trunk http://bugzilla.qooxdoo.org/show_bug.cgi?id=1377).

> Mixin "qx.core.MAssert" is already included into Class
> "qx.dev.unit.TestCase" by class: qx.core.Object!
> Mixin "qx.ui.core.MExecutable" is already included into Class
> "qx.ui.toolbar.RadioButton" by class: qx.ui.toolbar.RadioButton!
>
> Is there any setting like exclude in the config.json file (similar to
> include),

Since this is a *runtime* and not a build-time problem, it wouldn't help
you much to change your config. But it's not a real problem so don't
worry about it.

>  so that I can tell my source job to exclude the above classes
> (and they will get automatically included because of the dependency)
>
>  

There is an 'exclude' key (see the docs), but if exclude a class it is
excluded, and will not be re-introduced through e.g. dependency checks,
so use with caution.

Thomas

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Amit Rana
Thanks for the info Thomas.

Actually, I am using the v0.8 SDK downloaded for the site, so can't get
the updates. But, its ok. Once I have my codebase ready, I can then get
the latest SDK.

The thing about the "exclude" func. in the docs. I found it for v0.7 but
not for v0.8. Any pointers ?

regards
Amit

thron7 wrote:

> Hi Amit,
>
>
>  
>> I have got the results but there is only 1 small bug. Some classes get
>> included multiple times giving errors in Firebug as :
>>
>> Setting "qx.tableResizeDebug" is already defined!
>>  
>>    
>
> This is just an annoyance you don't have to worry about (it has already
> been fixed in trunk http://bugzilla.qooxdoo.org/show_bug.cgi?id=1377).
>
>  
>> Mixin "qx.core.MAssert" is already included into Class
>> "qx.dev.unit.TestCase" by class: qx.core.Object!
>> Mixin "qx.ui.core.MExecutable" is already included into Class
>> "qx.ui.toolbar.RadioButton" by class: qx.ui.toolbar.RadioButton!
>>
>> Is there any setting like exclude in the config.json file (similar to
>> include),
>>    
>
> Since this is a *runtime* and not a build-time problem, it wouldn't help
> you much to change your config. But it's not a real problem so don't
> worry about it.
>
>  
>>  so that I can tell my source job to exclude the above classes
>> (and they will get automatically included because of the dependency)
>>
>>  
>>    
>
> There is an 'exclude' key (see the docs), but if exclude a class it is
> excluded, and will not be re-introduced through e.g. dependency checks,
> so use with caution.
>
> Thomas
>
>
>  

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: v0.8 - generate.py source to include even qx classes

Thomas Herchenroeder
In reply to this post by Amit Rana


Amit Rana wrote:
> The thing about the "exclude" func. in the docs. I found it for v0.7 but
> not for v0.8. Any pointers ?

Gee! It's actually missing from the docs <blush>... gimme until
tomorrow, then look for it on this page:
http://qooxdoo.org/documentation/0.8/generator_config_ref

Thomas

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel