-
10 Feb 2010 8:26 AM #11
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
-
10 Feb 2010 11:36 AM #12
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:
Thanks for this work, mate! Hope the developers take some of your fixes to the official air-adapter!Code:Ext.form.ComboBox.prototype.tpl
-
10 Feb 2010 11:47 AM #13
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
and than doCode:var myComboTpl = Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{yourFieldToDisplay}</div></tpl>');
Thanks for your bug reports and help with this!Code:var myCombo = new Ext.form.ComboBox({ tpl: myComboTpl, ... });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
-
10 Feb 2010 12:02 PM #14
Okay - works good
But I have to leave my own XTemplate:
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.Code:var comboTemplate = new Ext.XTemplate('<tpl for="."><div class="x-combo-list-item">{anzeigetext:defaultValue(" ")}</div></tpl>');
Adding following code before line 880 works for me:
Code:if(record[combo.displayField || combo.valueField] === "") return " ";
-
10 Feb 2010 12:13 PM #15
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
-
10 Feb 2010 12:20 PM #16
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], " "));
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
-
11 Feb 2010 1:43 AM #17
Hi Makana,
I didn't know the value function. But that is exactly, what I meant
-
11 Feb 2010 7:57 AM #18
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
-
11 Feb 2010 8:27 AM #19
The only thing, I still got in my project, is the following:
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?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");
-
11 Feb 2010 8:40 AM #20
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:
I have to say, I never used the c-format, more the U. The IMO mostly used c-format isCode:Date.precompileFormats("d.m.Y|d.m.Y H:i|c");, which is in the precompiled formats string.Code:Y-m-d H:i:s
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


Reply With Quote