locked
Tooltip winControl gets lost somewhere???

    Question

  • Please find below a copy of my Watchlist. I am using Win 8 Release Preview, VS 2012 Express. If retrieved via getElementsByClassName().wincontrol, the tooltip object is found but if retrieved by getElementById().wincontrol, it fails. Please help.

      container.getElementsByClassName('tooltip')[0].id                                      "aZ0_0Tooltip"
    +container.getElementsByClassName('tooltip')[0].winControl {...}                 Object, (Tooltip_ctor)

      document.getElementById("aZ0_0Tooltip").winControl                                 undefined

    Friday, October 26, 2012 2:20 AM

Answers

  • Do you have more than one object with the same ID "aZ0_0Tooltip" in the page?

    Anyway, this might be a bug in Release Preview... You should migrate to Windows 8 RTM and try to reproduce this.

    Cheers,
    Caio Proiete

     


    Caio Proiete
    Microsoft MVP, MCT, MCPD, MCTS, MCSD
    http://caioproiete.net

    • Marked as answer by Song Tian Thursday, November 1, 2012 9:25 AM
    Friday, October 26, 2012 3:05 PM

All replies

  • Do you have more than one object with the same ID "aZ0_0Tooltip" in the page?

    Anyway, this might be a bug in Release Preview... You should migrate to Windows 8 RTM and try to reproduce this.

    Cheers,
    Caio Proiete

     


    Caio Proiete
    Microsoft MVP, MCT, MCPD, MCTS, MCSD
    http://caioproiete.net

    • Marked as answer by Song Tian Thursday, November 1, 2012 9:25 AM
    Friday, October 26, 2012 3:05 PM
  • Thanks for the reply, Caio. First thing I checked was duplicate id. Definitely a bug, as I could work around the problem by using div.setAttribute('data-win-control','WinJS.UI.Tooltip'); and div.setAttribute('data-win-options', etc.). That way the WinJS.UI.processAll properly catches the dynamically created control, whereas var tooltip = new WinJS.UI.Tooltip(div) has problems. I will update to the release bits this weekend.

    • Edited by Ydnorok Friday, October 26, 2012 3:55 PM
    Friday, October 26, 2012 3:54 PM