Results 1 to 4 of 4

Thread: Exception when calling Ext.Msg.show multiple times (doesn't have to be consecutive)

  1. #1
    Sencha User
    Join Date
    Sep 2017
    Posts
    8
    Answers
    1
    Vote Rating
    6
      0  

    Default Exception when calling Ext.Msg.show multiple times (doesn't have to be consecutive)

    Hi,
    In this given example https://fiddle.sencha.com/#view/editor&fiddle/2ak5 I am trying to simulate my problem.

    If I create and show the message only once, everything works fine.
    The problem starts when you try and show the message more than three times.

    I am using the ITERATION variable to simulate this, you will see that after several runs, it fails with an exception:
    TypeError: Cannot read property 'replaceCls' of null

    I guess it is caused due to using the same singleton message and a bug in the code,
    can someone verify that? is it fixable?
    Am I doing something wrong?

    btw, if you will remove the items array, it will work, but I don't see a reason why it should not work with items.

    help

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,099
    Answers
    734
    Vote Rating
    969
      0  

    Default

    It's not expecting items as a parameter to show. If you read the docs it's not a valid config.

    Just extend the dialog class if you want a popup.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    103
    Answers
    3
    Vote Rating
    10
      0  

    Default

    If you call Ext.Msg.prompt multiple times with the `prompt` config, for example, `prompt: { xtype: 'textfield' }`, it will throw an exception.
    Fiddle: https://fiddle.sencha.com/#view/editor&fiddle/2aj6

    It's because the previous prompt component was destroyed twice, and the second time fails.
    I am using 6.5 modern.
    BTW, classic works fine.

  4. #4
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,099
    Answers
    734
    Vote Rating
    969
      0  

    Default

    Looks like a bug, but it's not really related to what OP posted.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Similar Threads

  1. Replies: 6
    Last Post: 28 Nov 2011, 2:50 AM
  2. Multiple consecutive Filters applied to a store - How to?
    By jonas sabu in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 22 Feb 2011, 8:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •