• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

parent.showMessage()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • parent.showMessage()

    I was using the parent.showMessage() function in ExtJS 3.0 and it appears to be gone or at least not work in 4.0. Does anyone know what can be used as a replacement that would display a message window for a short time and then automatically disappears?

  • #2
    Valence.util.msg should work for you.

    Comment


    • #3
      Not tested

      Maybe try something like...

      Code:
      Ext.Msg.alert('Status', 'Information has been Saved!');
      
      //Hide after 8 Seconds
      Ext.Function.defer(function(){
        Ext.Msg.hide();
      }, 8000);
      Again didn't test this however just a quick thought

      Comment


      • #4
        I tired both suggestions and neither appear to work. I tried Valence.util.showMessage and nothing comes up on the screen. Valence.util.msg generates the undefined error.
        Ext.Msg.alert displays the message on the screen, but you have to click okay to get it to go away. The Ext.Function.defer generates an error saying that Ext.Function is not defined. I double checked to make sure I was running this under the new 3.0 beta and I am. The ExtJS 4.0 docs show Ext.Function as valid, I'm not sure why this is not picking this up.

        Comment


        • #5
          Valence.util.msg should work as it is already used in the new Settings program. It is used like below:


          Code:
          Valence.util.msg(vmsg.settingsSavedSuccessfully,'');
          Note that 2 parameters are being passed, title and message. In this case, message is being passed as blank.

          Be sure that you are including:

          Code:
          <script type="text/javascript" src="/vvresources/valence-extjs4.js"></script>

          Comment


          • #6
            I think the extjs4 script include is what I am missing. I didn't notice that that was added to the samples. I'll try it with that tomorrow.

            Comment


            • #7
              Just following up, did this work out all right for you?

              Comment


              • #8
                Sort of...I now appear to have other errors. I haven't had much time to work on this. Maybe in the next few weeks I can spend more time with Valence 3.0.

                Comment


                • #9
                  I finally had a chance to try out the
                  Code:
                  Valence.util.msg(vmsg.settingsSavedSuccessfully,'');
                  using ExtJS 4.0 and it worked fine. It puts the message at the top of the screen, instead of the bottom, but it works and that's all that is important!

                  Comment

                  Working...
                  X