469,361 Members | 2,363 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

spinning data

Hi Friends,
In ext-touch-debug.js file there is a function with the name Ext.Picker in which there is code for placing the values in the spinner. Here is the code

Expand|Select|Wrap|Line Numbers
  1. Ext.Picker = Ext.extend(Ext.Panel, {
  2. …………….
  3. …………..
  4. …………
  5. for (i = 0, ln = this.slots.length; i < ln; i++) {
  6. slot = this.slots[i]; // alert('i value is..... '+i);
  7. //alert("display field is....."+this.displayField);
  8. // key
  9. slotItem = {
  10. xtype: 'dataview',
  11. itemSelector: this.pickerItemCls,
  12. isSlot: true,
  13. flex: 1,
  14. listeners: {
  15. itemtap: this.onItemTap,
  16. scope: this
  17. },
  18. scroll: {
  19. direction: 'vertical',
  20. scrollbars: false,
  21. snapping: true,
  22. deceleration: 0.006,
  23. friction: 0.2,
  24. index: i,
  25. listeners: {
  26. scrollend: this.onScrollEnd,
  27. scope: this
  28. }
  29. },
  30. tpl: '<ul class="x-picker-{align}"><tpl for="."><li class="x-picker-item {cls} <tpl if="extra">x-picker-invalid</tpl>">{' + this.displayField + '}</li></tpl></ul>',
  31. store: new Ext.data.Store({
  32. model: this.model,
  33. data: slot.items
  34. })
  35. };
  36. if (this.useTitles) {
  37. slotItem.dockedItems = [{
  38. xtype: 'toolbar',
  39. dock: 'top',
  40. title: slot.title || slot.text
  41. }];
  42. }
  43. // alert(items.push(slotItem));
  44. items.push(slotItem);
  45. }
  46. }
The above code is used to configure the spinner.Now I have created a image buttons Shake and lock as shown in figure on url http://www.urbanspoon.com/spin-widget
My requirement is:
1. When I click on Shake image the Spinner will dynamically scroll and select some random values. The spinner is configured in the above for loop so I try to call that function in the onclick event of Shake button and tried to control the spinner. But I failed to control the Scroll the Spinner.
2. In the same when I click on Lock image its relevant Spinner has to be locked and unlocked.

I tried in different ways but I Strucked to find a solution to those 2 functionalites. Please help me its urgent.
for reference please visit http://www.urbanspoon.com/spin-widget
Thanks in Advance......
Sep 20 '10 #1
0 1068

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by John Cosmas | last post: by
reply views Thread by bungle | last post: by
6 posts views Thread by benz | last post: by
4 posts views Thread by Daniel | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.