1. #11
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Sorry, dude, you're right!
    I changed the GroupingView behavior and the SQLiteStore thing (which was an odd one). It should work like expected, now!
    To your last post, Ext.id() is already inside
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  2. #12
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Excellent work! Nothing more to beef
    Just one question - how do I use your combobox XTemplate? I found this in your Code, but don't know exactly how to use it with my Store:
    Code:
    Ext.form.ComboBox.prototype.tpl
    Thanks for this work, mate! Hope the developers take some of your fixes to the official air-adapter!

  3. #13
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    The ComboBox template I defined in the adapter is the default one, if you DON'T specify one.

    If you don't specify a template (leave config option tpl undefined):
    The default ExtJS behavior is used: The combo displays the value of the specified displayField. It's like in normal ExtJS outside Adobe AIR.

    If you want to specify a template:
    Do as before -> define a new templates before Ext.onReady
    Code:
    var myComboTpl = Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{yourFieldToDisplay}</div></tpl>');
    and than do
    Code:
    var myCombo = new Ext.form.ComboBox({
        tpl: myComboTpl,
        ...
    });
    Thanks for your bug reports and help with this!
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  4. #14
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Okay - works good But I have to leave my own XTemplate:
    Code:
    var comboTemplate = new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{anzeigetext:defaultValue("&nbsp;")}</div></tpl>');
    When I got an empty string as DisplayValue, it looks bad, because the item in the list is very small. In my template, the empty item has the same height, as the other items. If you like, you could implement it.
    Adding following code before line 880 works for me:
    Code:
    if(record[combo.displayField || combo.valueField] === "") return "&nbsp;";

  5. #15
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    What for a combo do you have? No displayField value, no valueField value? At least a valueField should exist, even if the items are custom ones...
    What do you select then? An empty item? I don't understand it....
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  6. #16
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Oh, sorry... I believe I misunderstood this....
    you have a displayField defined, but the displayField value is empty (so the || has no effect).... but wouldn't it be better to display the valueField then?
    something like
    Code:
    return Ext.value(record[combo.displayField || combo.valueField], Ext.value(record[combo.valueField], "&nbsp;"));
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  7. #17
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Hi Makana,

    I didn't know the value function. But that is exactly, what I meant

  8. #18
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    I updated the file with this. I think, it makes sense to check for displayField, then valueField and display it in this order.
    Thanks again for pointing all these things out! Please keep on feeling free to improve that stuff!
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

  9. #19
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    The only thing, I still got in my project, is the following:
    Code:
    Date.createParser('c');
    Date.createParser('d.m.Y H:s');
    Date.precompileFormats("d.m.Y");
    Date.precompileFormats("d.m.Y H:s");
    Date.precompileFormats("c");
    In line 744 at least the "c" could be added, because it is used a lot. And I saw in the code, that every format which is called via the function precompileFormats, is automatically sent to the function createParser - so in my code I don't need the first 2 lines, right?

  10. #20
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    527
    Vote Rating
    20
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    I didn't touch the Date stuff. So the German date formats aren't inside.
    Btw, do you mean "d.m.Y H:i"? Or do you really want to display hour and seconds?

    Yes, you don't need the first two lines. You only need one line:
    Code:
    Date.precompileFormats("d.m.Y|d.m.Y H:i|c");
    I have to say, I never used the c-format, more the U. The IMO mostly used c-format is
    Code:
    Y-m-d H:i:s
    , which is in the precompiled formats string.
    I think, it isn't to much, to add such a line of code, since it is needed for local date formats anyway.
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR