Sigma Php Ajax framework, Ajax Components, GUI Builder
May 23, 2012, 09:16:13 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Components  (Read 542 times)
Anthony
Full Member
***
Posts: 24


View Profile
« on: August 12, 2011, 06:07:05 AM »

Hi Linb

Newbie here.

I am having problems accessing all the components in code view.

That is in design view I have layout a number of components on the canvas, but when I try to access the eg 

var ns = this;

ns.  the intellisense only list some of the components but not all.

Is there a limit to the number of components that can be used per js.

In design view it is fine.


I should add that when I copied and paste to a new project I had the same problem, I then began removing components and that the component I was monitoring then appear.

Please help


Anthony
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #1 on: August 12, 2011, 06:58:32 PM »

Can you tell me how to react it?

Actually, ”the intellisense“ is not a perfect tool yet. You can not completely count on it
Logged
Anthony
Full Member
***
Posts: 24


View Profile
« Reply #2 on: August 15, 2011, 04:50:48 AM »

Can you tell me how to react it?

Not sure what you mean by react it.

But the problem is that I have a tab component with 8 pages, first page  has 69 components made up of labels, text,links, two icon images size, combo's etc.

Only components up to 56 are seen.

However I can type the code in without intellisense prompt and that seems to execute fine.

I assume that the intellisense will be refined in the future.

Thanks

Anthony

Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #3 on: August 15, 2011, 06:13:30 PM »

Can you attach this Com's code here?

I'll check out this problem.
Logged
Anthony
Full Member
***
Posts: 24


View Profile
« Reply #4 on: August 17, 2011, 04:24:11 AM »

typical example see button code at the end.


// The default code is a com class (inherited from linb.Com)
Class('App', 'linb.Com',{
    // Ensure that all the value of "key/value pair" does not refer to external variables
    Instance:{
        // To initialize instance(e.g. properties)
        initialize : function(){
            // To determine whether or not the com will be destroyed, when the first UI control be destroyed
            this.autoDestroy = true;
            // To initialize properties
            this.properties = {};
        },
        // To initialize internal components (mostly UI controls)
        // *** If you're not a skilled, dont modify this function manually ***
        iniComponents : function(){
            // [[code created by jsLinb UI Builder
            var host=this, children=[], append=function(child){children.push(child.get(0))};
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input12")
                .setLeft(130)
                .setTop(540)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input12")
            );
           
            append(
                (new linb.UI.SButton)
                .setHost(host,"ctl_sbutton1")
                .setLeft(30)
                .setTop(30)
                .setCaption("click me")
                .onClick("_ctl_sbutton1_onclick")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label1")
                .setLeft(30)
                .setTop(80)
                .setCaption("ctl_label1")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label2")
                .setLeft(40)
                .setTop(100)
                .setCaption("ctl_label2")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label3")
                .setLeft(60)
                .setTop(130)
                .setCaption("ctl_label3")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label4")
                .setLeft(90)
                .setTop(160)
                .setCaption("ctl_label4")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label5")
                .setLeft(80)
                .setTop(180)
                .setCaption("ctl_label5")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label6")
                .setLeft(110)
                .setTop(200)
                .setCaption("ctl_label6")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input2")
                .setLeft(30)
                .setTop(220)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input2")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input3")
                .setLeft(60)
                .setTop(250)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input3")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input4")
                .setLeft(20)
                .setTop(280)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input4")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input5")
                .setLeft(20)
                .setTop(310)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input5")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input6")
                .setLeft(50)
                .setTop(340)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input6")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input7")
                .setLeft(40)
                .setTop(370)
                .setHeight(44)
                .setLabelSize(20)
                .setLabelPos("top")
                .setLabelCaption("ctl_input7")
                .setLabelHAlign("left")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input8")
                .setLeft(70)
                .setTop(430)
                .setHeight(44)
                .setLabelSize(20)
                .setLabelPos("top")
                .setLabelCaption("ctl_input8")
                .setLabelHAlign("left")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input9")
                .setLeft(190)
                .setTop(400)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input9")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input10")
                .setLeft(20)
                .setTop(490)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input10")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input11")
                .setLeft(310)
                .setTop(460)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input11")
            );
           
            append(
                (new linb.UI.Link)
                .setHost(host,"ctl_link2")
                .setLeft(40)
                .setTop(60)
                .setCaption("ctl_link2")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input13")
                .setLeft(300)
                .setTop(50)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input13")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input14")
                .setLeft(330)
                .setTop(100)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input14")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input15")
                .setLeft(410)
                .setTop(130)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input15")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input16")
                .setLeft(380)
                .setTop(180)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input16")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input17")
                .setLeft(400)
                .setTop(220)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input17")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input18")
                .setLeft(460)
                .setTop(240)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input18")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input19")
                .setLeft(450)
                .setTop(270)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input19")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input20")
                .setLeft(520)
                .setTop(300)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input20")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input21")
                .setLeft(490)
                .setTop(320)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input21")
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input22")
                .setLeft(520)
                .setTop(350)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input22")
            );
           
            append(
                (new linb.UI.ComboInput)
                .setHost(host,"ctl_comboinput2")
                .setLeft(510)
                .setTop(370)
                .setLabelCaption("ctl_comboinput2")
                .setItems([{"id":"a", "caption":"item a", "image":"img/demo.gif"}, {"id":"b", "caption":"item b", "image":"img/demo.gif"}, {"id":"c", "caption":"item c", "image":"img/demo.gif"}, {"id":"d", "caption":"item d", "image":"img/demo.gif", "disabled":true}])
            );
           
            append(
                (new linb.UI.ComboInput)
                .setHost(host,"ctl_comboinput3")
                .setLeft(580)
                .setTop(390)
                .setLabelCaption("ctl_comboinput3")
                .setItems([{"id":"a", "caption":"item a", "image":"img/demo.gif"}, {"id":"b", "caption":"item b", "image":"img/demo.gif"}, {"id":"c", "caption":"item c", "image":"img/demo.gif"}, {"id":"d", "caption":"item d", "image":"img/demo.gif", "disabled":true}])
            );
           
            append(
                (new linb.UI.Input)
                .setHost(host,"ctl_input23")
                .setLeft(610)
                .setTop(420)
                .setWidth(240)
                .setLabelSize(120)
                .setLabelCaption("ctl_input23")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label7")
                .setLeft(570)
                .setTop(30)
                .setCaption("ctl_label7")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label8")
                .setLeft(620)
                .setTop(60)
                .setCaption("ctl_label8")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label9")
                .setLeft(650)
                .setTop(80)
                .setCaption("ctl_label9")
            );
           
            append(
                (new linb.UI.SCheckBox)
                .setHost(host,"ctl_scheckbox1")
                .setLeft(700)
                .setTop(110)
                .setCaption("ctl_scheckbox1")
            );
           
            append(
                (new linb.UI.Label)
                .setHost(host,"ctl_label10")
                .setLeft(670)
                .setTop(150)
                .setCaption("ctl_label10")
            );
           
            return children;
            // ]]code created by jsLinb UI Builder
        },
        // Give a chance to load other com
        iniExComs : function(com, threadid){
        },
        // Give a chance to determine which UI controls will be appended to parent container
        customAppend : function(parent, subId, left, top){
            // "return false" will cause all the internal UI controls will be added to the parent panel
            return false;
        },
        // This instance's events
        events : {},
        _ctl_sbutton1_onclick : function (profile, e, src, value) {
            var uictrl = profile.boxing();
            var me = this;
           
           
            me.ctl_label1.setCaption("test");  // This one shows the intellisense
           
            //  me.ctl_label10.     //This One does NOT show intellisense
           
            linb.alert("hi","I'm " + uictrl.getAlias());
        }
    }
});
Logged
linb
Administrator
Hero Member
*****
Posts: 435


View Profile
« Reply #5 on: August 17, 2011, 06:12:49 PM »

I tested your code in version 4.0 (SVN), it works well.
Logged
Anthony
Full Member
***
Posts: 24


View Profile
« Reply #6 on: August 18, 2011, 05:58:26 AM »

Yes thanks, the executed code would works fine, it was the intellisense I was having problems with which you
kindly explained that I should not rely on as it is incomplete.


Anthony
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!