1. #211
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    All,

    @jheid - Will do!

    @nadim - I got a bit lost - are you using suspendEvents, then resumeEvents, then clicking the arrow?

    Even better do you have a test case. And please let me know which browser/version you tried.

    Thanks.

    @all - Apologies for lack of responses/updates - I am very busy at the moment, but will aim to get a new release out within a week.

  2. #212
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default


    I find that when I use suspendEvents() and then resumeEvents() I get the error I described above.

  3. #213
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default emptytext

    emptytext


    I've re-worked parts of my code and here is what is currently tripping me up.
    I reset the sbs and then the emptytext isn't set anymore. I've tried calling .applyEmptyText() but it adds the empty text and remains in a greyed out state. I have to click elsewhere and then click back on the sbs to get it to work correctly.

    If it makes any difference I call a reset on the entire form, then call setValues on the entire form. The sbs values get populated correctly but the first sbs in the form has focus and when I start typing the text is light grey and autocomplete doesn't work. Here is the exact sequence of calls I make:
    ss.suspendEvents(false);
    ss.reset();
    ss.setValues(valObj);
    ss.resumeEvents();

    Any suggestions?

  4. #214
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default findInStore

    findInStore


    I also made the following change to findinstore:

    findInStore : function(val){
    if(typeof(val) === 'string') {
    val = val.trim();
    }
    var index = this.store.find(this.valueField, val);
    if(index > -1){
    return this.store.getAt(index);
    }
    return false;
    },

    It was getting called with val as a number and val.trim() was failing.

  5. #215
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @nadim,

    Using the example page here (http://www.technomedia.co.uk/SuperBo...examples3.html)

    I have reset the component and emptyText still works and reset the form and the emptyText still works - you can try yourself with the firebug console :

    PHP Code:
    Ext.getCmp('f1Form').getForm().reset(); 
    If you are having problems, please provide a bug report and isolated test case as per this thread and I'll have a look for you:

    http://www.extjs.com/forum/showthread.php?t=71015

    Thanks,

    Dan

  6. #216
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default example

    example


    Here is an example, current code in example is:
    buttons: [{ 152 text: "setValue('AK,NY,CO')",
    153 scope: this,
    154 handler: function(){
    155 Ext.getCmp('selector1').setValue('AK,NY,CO');
    156 }

    Change line 155 to be:
    Ext.getCmp('selector1').setValue('');

    Empty text doesn't get set. Calling reset right after doesn't fix this, nor does .applyEmptyText().


    Is there some way I can have it reset to it's original state (with empty text) after calling .setValue('') ?

  7. #217
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @nadim,

    you are confusing me - you keep posting different issues, none of which are accompanied with a decent bug report or test case. Have you looked at the post I referred you to:

    http://www.extjs.com/forum/showthread.php?t=71015

    So your current issue appears to be that you can't use setValue with an empty string? What about your previous report of empty text or resetting the form or suspending then resuming events?

    I'm happy to help, but I cannot follow what you are trying to do or what you are having problems with.

    Please see this thread:

    http://www.extjs.com/forum/showthread.php?t=71015

    Thanks

  8. #218
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default isolated

    isolated


    Sorry for the confusion, please try this, it is as isolated as I can get my example.
    Go to your page:
    http://www.technomedia.co.uk/SuperBo...examples3.html

    Open firebug, paste the following in the console and run it:
    Ext.getCmp('selector1').setValue('AK,NY,CO');
    Ext.getCmp('selector1').suspendEvents();
    Ext.getCmp('selector1').reset();
    Ext.getCmp('selector1').setValue('');
    Ext.getCmp('selector1').enable();
    Ext.getCmp('selector1').applyEmptyText();
    Ext.getCmp('selector1').resumeEvents();

    Now if you click on the superselectbox, notice that the empty text is applied but clicking doesn't empty the text, what i type is after the empty text and it remains greyed out. Screenshot of the behaviour I'm seeing attached as an image. If you don't get this behaviour, hit run a couple times and you should see it.
    Attached Images

  9. #219
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @nadim,

    applyEmptyText is a private method - do not use it.

    Apart from that, (and excuse me for being blunt) how ridiculous - what on earth are you trying to achieve with those method calls.

    Do you not have a sensible use case?

  10. #220
    Ext User
    Join Date
    Aug 2009
    Posts
    15
    Vote Rating
    0
    nadim is on a distinguished road

      0  

    Default


    if i remove .applyEmptyText() the empty text is not applied upon .setValues('').

    This is an actual scenario that is coming up in my application. I simply reduced all the calls to the relevant ones. I am saving the form state and then setting it back. When I set it back to a previous state I don't want events to fire so I suspend them. Everything works fine, except I can't get the empty text back.

    I don't mind you being blunt at all. Thank you very much for this component! If there is a better way for me to achieve what I'm trying to do then I definitely want to know about it.

    Thanks.

Thread Participants: 119

  1. galdaka (9 Posts)
  2. aconran (1 Post)
  3. stever (4 Posts)
  4. dj (1 Post)
  5. mystix (18 Posts)
  6. MarkB (3 Posts)
  7. DrZog (1 Post)
  8. JorisA (2 Posts)
  9. jheid (3 Posts)
  10. Joe (1 Post)
  11. mschering (1 Post)
  12. gigel (1 Post)
  13. akannu (1 Post)
  14. phillipL (1 Post)
  15. badgerd (1 Post)
  16. cmendez21 (1 Post)
  17. mjlecomte (1 Post)
  18. grgur (1 Post)
  19. xantus (1 Post)
  20. garraS (3 Posts)
  21. vahid4134 (2 Posts)
  22. Lloyd K (2 Posts)
  23. boonkerz (3 Posts)
  24. crxtech (3 Posts)
  25. mishanian (7 Posts)
  26. fpw23 (1 Post)
  27. sanjshah (6 Posts)
  28. Zolcsi (1 Post)
  29. SharePat (1 Post)
  30. mjhaston (1 Post)
  31. radtad (16 Posts)
  32. Joyfulbob (2 Posts)
  33. kveeiv (1 Post)
  34. armandoxxx (2 Posts)
  35. imran (1 Post)
  36. Eric24 (1 Post)
  37. drunknmunky (1 Post)
  38. raphac (1 Post)
  39. charleshimmer (1 Post)
  40. frankthetank (4 Posts)
  41. qooleot (3 Posts)
  42. gianpaulo (1 Post)
  43. dennispg (9 Posts)
  44. dasnk (1 Post)
  45. grahamda (1 Post)
  46. sdavids (1 Post)
  47. jasonb885 (1 Post)
  48. wemerson.januario (1 Post)
  49. dizor (3 Posts)
  50. Stju (5 Posts)
  51. extjs_new (1 Post)
  52. senacle (1 Post)
  53. elderotaku (2 Posts)
  54. Dumas (1 Post)
  55. grzegorz.borkowski (13 Posts)
  56. bueth (1 Post)
  57. nonyus (2 Posts)
  58. travisbell (2 Posts)
  59. Jangla (2 Posts)
  60. woooop (2 Posts)
  61. MH61 (2 Posts)
  62. TDub (1 Post)
  63. antoniode (5 Posts)
  64. xiongzhijian51 (1 Post)
  65. l0ga4 (1 Post)
  66. nohurge (2 Posts)
  67. MarkBOneSmart (1 Post)
  68. The Transporter (2 Posts)
  69. swarnendude (1 Post)
  70. arconen (2 Posts)
  71. mratzloff (9 Posts)
  72. Tom23 (1 Post)
  73. nadim (15 Posts)
  74. hongtj (2 Posts)
  75. max.hauser (2 Posts)
  76. dcw (1 Post)
  77. pilotsnipes (2 Posts)
  78. matthewcrist (2 Posts)
  79. fargs (1 Post)
  80. dvuja2 (2 Posts)
  81. sudhirhv (1 Post)
  82. lanhun (2 Posts)
  83. galoch (1 Post)
  84. frrogoy (1 Post)
  85. tboswell (1 Post)
  86. ozum (5 Posts)
  87. scusyxx (1 Post)
  88. hoca (1 Post)
  89. jayasreepc (1 Post)
  90. Jensen (1 Post)
  91. icarey (5 Posts)
  92. mohan_b (1 Post)
  93. skbach_pointyhat (1 Post)
  94. timbonicus (3 Posts)
  95. rachid.abdessamad (1 Post)
  96. ajitmogra (1 Post)
  97. Korbin (1 Post)
  98. istetska (3 Posts)
  99. ian.young (1 Post)
  100. muncher (2 Posts)
  101. sebterzi (2 Posts)
  102. forestclown (1 Post)
  103. Akey (1 Post)
  104. pret (1 Post)
  105. OpnSrce (1 Post)
  106. sriramkumarp (1 Post)
  107. extjs-dev (4 Posts)
  108. mvoss (1 Post)
  109. thomaskee007 (1 Post)
  110. rajshinny (1 Post)
  111. masood (1 Post)
  112. sebholl (1 Post)
  113. forestkwan (1 Post)
  114. deepthi_r (1 Post)
  115. panshr (1 Post)
  116. brian.moeskau (1 Post)
  117. ldashevskiy (1 Post)
  118. lbilde (1 Post)
  119. aoyii (1 Post)

Tags for this Thread