How to use iniExComs, customAppend?

Develop and Deploy Cross-Browser Web Apps .

How to use iniExComs, customAppend?

Postby Sergei » Mon Sep 09, 2013 3:58 am

About the sections iniExComs, customAppend created in CrossUI RAD is silent on a Cookbook, and API poorly and only about customAppend. Could you give (or link) are typical examples of the application of these sections.
And also I would like to use the example of multiple modules Class (each in its own js) on a Html page. For earlier thanks ).
Sergei
 
Posts: 31
Joined: Sat Apr 27, 2013 9:48 am

Re: How to use iniExComs, customAppend?

Postby support » Mon Sep 09, 2013 4:33 am

>> About the sections iniExComs, customAppend created in CrossUI RAD is silent on a Cookbook, and API poorly and only about customAppend.
>> Could you give (or link) are typical examples of the application of these sections.

   
Class('App', 'xui.Com',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Tools
var host=this, children=[], append=function(child){children.push(child.get(0))};

append(
(new xui.UI.SButton)
.setHost(host,"ctl_sbutton1")
.setLeft(130)
.setTop(70)
.setCaption("Created in Desinger")
.onClick("_ctl_sbutton1_onclick")
);

return children;
// ]]Code created by CrossUI RAD Tools
},
// Give a chance to load other com
iniExComs : function(com, threadid){
xui.message('iniExComs : start');
if(xui.Thread.isAlive(threadid)){
xui.Thread(threadid).suspend();
// you can call an asyn process to add some widgets (even from other module)
_.asyRun(function(){

var input = new xui.UI.SButton;
input.setLeft(100).setTop(100).setCaption("Created in iniExComs ");
com.AddComponents(input);

xui.message('iniExComs : end');

xui.Thread(threadid).resume();
},3000);
}
}
}
});
   


>> And also I would like to use the example of multiple modules Class (each in its own js) on a Html page. For earlier thanks ).

http://localhost:8080/crossui.com/xui/E ... index.html
support
 
Posts: 352
Joined: Sat Apr 27, 2013 9:22 am

Re: How to use iniExComs, customAppend?

Postby mingodad » Sun May 18, 2014 9:56 am

Fix html tags appearing on code:
javascript code
Class('App', 'xui.Com',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Tools
var host=this, children=[], append=function(child){children.push(child.get(0))};

append(
(new xui.UI.SButton)
.setHost(host,"ctl_sbutton1")
.setLeft(130)
.setTop(70)
.setCaption("Created in Desinger")
.onClick("_ctl_sbutton1_onclick")
);

return children;
// ]]Code created by CrossUI RAD Tools
},
// Give a chance to load other com
iniExComs : function(com, threadid){
xui.message('iniExComs : start');
if(xui.Thread.isAlive(threadid)){
xui.Thread(threadid).suspend();
// you can call an asyn process to add some widgets (even from other module)
_.asyRun(function(){

var input = new xui.UI.SButton;
input.setLeft(100).setTop(100).setCaption("Created in iniExComs ");
com.AddComponents(input);

xui.message('iniExComs : end');

xui.Thread(threadid).resume();
},3000);
}
}
}
});
mingodad
 
Posts: 11
Joined: Fri May 16, 2014 11:23 am


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron