Loading ...
Sorry, an error occurred while loading the content.

setting tooltip text property quickly gets lost

Expand Messages
  • Steven Hartland
    If you create a tooltip object with a default text and then shortly after set its text property then the value of that set is lost and the resultant tooltip
    Message 1 of 4 , Jul 31, 2008
    • 0 Attachment
      If you create a tooltip object with a default text and then shortly
      after set its text property then the value of that set is lost and
      the resultant tooltip has the default text as its body.

      I'm using version: 2.5.2 here if that makes any difference.

      Regards
      Steve

      ================================================
      This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

      In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
      or return the E.mail to postmaster@....
    • Steven Hartland
      Using queueProperty instead of setProperty seemed to help at first but was just timing :( The workaround I ended up with for this was to call oTip.doShow()
      Message 2 of 4 , Aug 3 3:51 PM
      • 0 Attachment
        Using queueProperty instead of setProperty seemed to help at first but was just timing :(
         
        The workaround I ended up with for this was to call oTip.doShow() after creating the tip with an explicit x and y, then when updating the text property calling oTip.doShow() again.
        e.g.
         
          // N.B. oParams.visible doesn't seem to have any effect
          oParams.x = posx;
          oParams.y = posy;
         
          var oTip = new YAHOO.widget.Tooltip( sId + "_tip", oParams );
          oTip.doShow(); // <- Required to show, oParams.visible doesn't work
        .....
         
          oTip.cfg.setProperty( 'text', sNewText );
          oTip.doShow(); // <- required or changes dont display
         
        Hope this helps someone else as this had me scratching my head for ages.
         
            Regards
            Steve
         
        ----- Original Message -----
        Sent: Friday, August 01, 2008 2:03 AM
        Subject: [ydn-javascript] setting tooltip text property quickly gets lost

        If you create a tooltip object with a default text and then shortly
        after set its text property then the value of that set is lost and
        the resultant tooltip has the default text as its body.

        I'm using version: 2.5.2 here if that makes any difference.

        Regards
        Steve

        ============ ========= ========= ========= =========
        This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

        In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
        or return the E.mail to postmaster@multipla y.co.uk.


        ================================================
        This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

        In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
        or return the E.mail to postmaster@....
      • Satyen Desai
        Hi, I don t see this behavior on the following test page (or I m misunderstanding your use case):
        Message 3 of 4 , Aug 7 6:06 PM
        • 0 Attachment

          Hi,

           

          I don’t see this behavior on the following test page (or I’m misunderstanding your use case):

           

          http://yuiblog.com/sandbox/yui/v252/examples/container/tooltip.html

           

          If you have an example you could share, I can take a look at it.

           

          Thanks,

          Satyen

           


          From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Steven Hartland
          Sent: Thursday, July 31, 2008 6:03 PM
          To: ydn-javascript@yahoogroups.com
          Subject: [ydn-javascript] setting tooltip text property quickly gets lost

           

          If you create a tooltip object with a default text and then shortly
          after set its text property then the value of that set is lost and
          the resultant tooltip has the default text as its body.

          I'm using version: 2.5.2 here if that makes any difference.

          Regards
          Steve

          ============ ========= ========= ========= =========
          This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

          In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
          or return the E.mail to postmaster@multipla y.co.uk.

        • Satyen Desai
          Hi Steve, Responded to your older message before I came across this one. If you re using Tooltip, you re not really supposed to be invoking the doShow()
          Message 4 of 4 , Aug 7 6:33 PM
          • 0 Attachment
            Hi Steve,

            Responded to your older message before I came across this one. If you're using Tooltip, you're not really supposed to be invoking the doShow() method.

            Both the visibility and position of the tooltip are designed to be controlled by mouseover/mousemove/mouseout events on it's context element.

            It invokes doShow() internally as an event listener for the mouseover event on the context element.

            If you want to programmatically control the position and visibility of a floating element you may want to consider using Overlay or Panel instead, depending on your application.

            Regards,
            Satyen

            ________________________________________
            From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Steven Hartland
            Sent: Sunday, August 03, 2008 3:52 PM
            To: ydn-javascript@yahoogroups.com
            Subject: Re: [ydn-javascript] setting tooltip text property quickly gets lost

            Using queueProperty instead of setProperty seemed to help at first but was just timing :(
             
            The workaround I ended up with for this was to call oTip.doShow() after creating the tip with an explicit x and y, then when updating the text property calling oTip.doShow() again.
            e.g.
             
              // N.B. oParams.visible doesn't seem to have any effect
              oParams.x = posx;
              oParams.y = posy;
             
              var oTip = new YAHOO.widget.Tooltip( sId + "_tip", oParams );
              oTip.doShow(); // <- Required to show, oParams.visible doesn't work
            .....
             
              oTip.cfg.setProperty( 'text', sNewText );
              oTip.doShow(); // <- required or changes dont display
             
            Hope this helps someone else as this had me scratching my head for ages.
             
                Regards
                Steve
             
            ----- Original Message -----
            From: Steven Hartland
            To: ydn-javascript@yahoogroups.com
            Sent: Friday, August 01, 2008 2:03 AM
            Subject: [ydn-javascript] setting tooltip text property quickly gets lost

            If you create a tooltip object with a default text and then shortly
            after set its text property then the value of that set is lost and
            the resultant tooltip has the default text as its body.

            I'm using version: 2.5.2 here if that makes any difference.

            Regards
            Steve

            ================================================
            This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

            In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
            or return the E.mail to postmaster@....

            ================================================
            This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.

            In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
            or return the E.mail to postmaster@....
          Your message has been successfully submitted and would be delivered to recipients shortly.