GIGJ.COM
welcome to my space
X
Welcome to:gigj.com
Search:  
NAVIGATION - HOME
Panel items
Published by: webmaster 2010-03-12

  • hello all,

    i have a wierd problem

    i have an array with different checkboxs as value.
    I make a for loop to make an item string for my panel.
    Later i try to add the made item string but i get an error "Ext.Container=Ext.extend(Ext.BoxComponen...S={};Ex t.reg("container",Ext.Container);"

    code:

    function createCheckBox(boxlabel){
    var checkBox = new Ext.form.Checkbox({
    inputType : 'checkbox',
    width : 70,
    hideLabel : true,
    //inputValue : inputValue,
    region : 'east',
    boxLabel : boxlabel
    });
    return checkBox;
    }

    this.categoryArray = new Array();
    categoryArray[0] = createCheckBox('testBox0');
    categoryArray[1] = createCheckBox('testBox1');
    categoryArray[2] = createCheckBox('testBox2');
    categoryArray[3] = createCheckBox('testBox3');
    categoryArray[4] = createCheckBox('testBox4');
    categoryArray[5] = createCheckBox('testBox5');
    categoryArray[6] = createCheckBox('testBox6');
    categoryArray[7] = createCheckBox('testBox7');
    categoryArray[8] = createCheckBox('testBox8');
    categoryArray[9] = createCheckBox('testBox9');
    categoryArray[10] = createCheckBox('testBox10');
    categoryArray[11] = createCheckBox('testBox11');

    function setCheckBoxProperties(){
    var items = '';// = '[';
    for(var i = 0; i < categoryArray.length; i++){
    this.cat[i] = 0;
    if(i == 0){
    items = items + 'categoryArray[' + i + ']';
    }else{
    items = items + ', ' + 'categoryArray[' + i + ']';
    [#CAY-1083] General Preferences Panel - items misaligned - Apache ::
    #679853, Fri Jul 25 09:29:00 PDT 2008, kmenard, Work on CAY-1083: General Preferences Panel - items misaligned Alignment is now fixed. Files Changed
    http://issues.apache.org/cayenne/browse/CAY-1083;jsessionid=EC6950D90BCFA3E5DBB9E70E2B388BA3?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
    HOME
    #221 (Re-arrange Gnome panel items) – 64 Studio::
    The Gnome panel items in version 0.9.0 aren't very ergnomically arranged. ( In [1091]) * Better layout for the panel items (closes #221)
    http://trac.64studio.com/64studio/ticket/221
    HOME
    }
    }
    //items = items + ']';
    return items;
    }

    var allCheckboxes = setCheckBoxProperties();

    alert(allCheckboxes);



    with the alert i can see that the string is oke. and if i add the string (copied from the alert box) to my panel i don't get any errors

    here is my panel when i get the error


    var checkboxPanel = new Ext.FormPanel({
    frame : false,
    width : 500,
    layout : 'column',
    region : 'south',
    split : true,
    items : [cat1, cat2, cat3, cat4, cat5, catAll, allCheckboxes]

    });


    here is the panel without the error (when i add the checkboxes manualy)


    var checkboxPanel = new Ext.FormPanel({
    frame : false,
    width : 500,
    layout : 'column',
    region : 'south',
    split : true,
    items : [cat1, cat2, cat3, cat4, cat5, catAll, categoryArray[0], categoryArray[1], categoryArray[2], categoryArray[3], categoryArray[4], categoryArray[5], categoryArray[6], categoryArray[7], categoryArray[8], categoryArray[9], categoryArray[10], categoryArray[11]]

    });




    can anybody explain why i can't add the items from the forloop as item on my panel?


  • Because items doesn't accept a string. Build an array, you're going to a whole bunch of extra trouble for nothing.


  • Because items doesn't accept a string. Build an array, you're going to a whole bunch of extra trouble for nothing.



    yes but this array can be longer in the future.

    how can i add an array filles with the checkboxes to the panel? (not by adding the arrays one by one)


  • anybody?


  • hehe if i could i would have helped myself ;)
    So if you can help i would be thankfull


  • you?


  • That's the whole point of an array:


    var arr = [1,2,3];
    for (var i = 4; i < 10; ++i)
    arr.push(i);

    for (var i = 0; i < arr.length; ++i)
    alert(arr[i]);





  • Nortel Unveils Vision, Strategy for Israeli High-Performance Net
    Busy Friday Leads to Strong Close for Net Stocks

    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Panel items , Please add it free.
  • funky site needed
  • flash designer motion graphics specialist
  • we need fmx2004pro developers asap
  • flash designer motion graphics specialist
  • required flash php developer
  • jedi academy clan site needed willing to pay small amount
  • funky site needed
  • new webdesign company seeks flash artist
  • akio designs searching for talented actionscripters
  • immediate start
  • flash developer
  • character drawing of me
  • looking for swift 3d for flash application development talent
  • gui flash designer needed

  • gui flash designer needed
  • we need fmx2004pro developers asap
  • looking for swift 3d for flash application development talent
  • akio designs searching for talented actionscripters
  • character drawing of me
  • flash developer
  • flash designer needed game clan site
  • new webdesign company seeks flash artist
  • required flash php developer
  • community portal
  • flash designer needed game clan site
  • immediate start
  • very quick 100 us as job
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 gigj.com        Site made:CFZ