I fixed it.

I have to add the variants in makefile.demo also. Atom1.html uses demo.js. 


kanugula wrote:
> 
> Thank you.
> 
> My application is built on Demo Browser model.
> In makefile.demobrowser, I defined variant as follows.
> # source version
> APPLICATION_ADDITIONAL_SOURCE_OPTIONS =
> --use-variant=application.mode:development
> # build version
> APPLICATION_ADDITIONAL_BUILD_OPTIONS =
> --use-variant=application.mode:production
> 
> I am able to access the variant in DemoBrowser.js, but in
> example/Atom1.html. I know all the examples load in IFrame.
> 
> The code in DemoBrowser.js and Atom1.html is
>        var tableModel;
>         if (qx.core.Variant.isSet("application.mode", "production"))  {
>             tableModel = new
> fdm.table.model.RemoteTableModel("http://localhost:8080/rpcService/.qxrpc";,
> "getRowCount", "getData", this);
>         } else {
>             tableModel = new
> fdm.table.model.RemoteTableModel("http://localhost:8080/rpcService/.qxrpc";,
> "getRowCount", "getData", this);
>         }
> 
> In Atom1.html, the FireBug shows the following error.
> Error: Variant "application.mode" is not defined.
> 
> Can somebody help me on this?
> 
> Thanks.
> Kanugula.
> 
> kanugula wrote:
>> 
>> Hello,
>> 
>> I frequently have to modify some classes to make Production Build.
>> 
>> Is there a way to pass parameter or any other solution in your mind at
>> build time to tell us that it is Production version. I use source version
>> for development. 
>> 
>> I need a condition to check that the call is coming from Development or
>> Production.
>> 
>> E.g.,
>> //var tableModel = new
>> MyRemoteTableModel(qx.io.remote.Rpc.makeServerURL(), "getRowCount",
>> "getData", this); <---- PROD
>> var tableModel = new
>> MyRemoteTableModel("http://localhost:8080/myService/.qxrpc";,
>> "getRowCount", "getData", this); <--- DEV
>> 
>> When I build the above code, I need to switch the two lines.
>> 
>> I have similar things at different places. It is so painful sometimes.
>> 
>> It would be nice to pass a parameter at build time, so I can check for
>> it's existence?
>> 
>> If (qx.build_parameter != undefined) it is PROD
>> else it is DEV
>> 
>> Any other solution is appreciated.
>> 
>> Than ks.
>> Kanugula. 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-I-pass-any-parameter-in-Qooxdoo-build-to-identify-Prod-or-Dev--tp16349822p16377578.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to