locked
Appbar localization error/problems.

    Question

  • Hi.

    I'm getting an error when trying to build my html/javascript app:

    "Exception is about to be caught by JavaScript library code at line 11889, column 21 in ms-appx://microsoft.winjs.1.0/js/base.js
    0x800a138f - Körningsfel i JavaScript: Det går inte att ange egenskapen tooltip för en referens som är odefinierad eller null
    The program '[11148] WWAHost.exe' has exited with code -1 (0xffffffff)."

    The error is for the winControl tooltip below. I'm also wondering why the attributes title works and not winControl? I get the same error when using WinControl label.

    <div id="appbar" data-win-control="WinJS.UI.AppBar">
             <button data-win-control="WinJS.UI.AppBarCommand"
                data-win-res="{attributes: {'title' : 'clearTooltip'}}"
               data-win-options="{id:'clearTileNotification', label:'Clear live tile', icon:'clear'}">
            </button>

            <button data-win-control="WinJS.UI.AppBarCommand"
                data-win-res="{winControl: {tooltip:'clearTooltip'}}"
                data-win-options="{id:'clearTileNotification', label:'Clear live tile', icon:'clear'}">
            </button>
    </div>

    btw, I'm using Multilingual App Toolkit in Visual Studio 2012.
    • Edited by Burger1 Saturday, January 26, 2013 12:08 AM
    Saturday, January 26, 2013 12:05 AM

All replies

  • Hi,

    Please refer to the example as follow:

    #Quickstart: adding an app bar with commands (Windows Store apps using JavaScript and HTML) (Windows)

    http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx

    #WinJS.UI.AppBar object (Windows)

    http://msdn.microsoft.com/en-us/library/windows/apps/br229670.aspx


    Roy
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 28, 2013 8:43 AM
  • Hi,

    Please refer to the example as follow:

    #Quickstart: adding an app bar with commands (Windows Store apps using JavaScript and HTML) (Windows

    #WinJS.UI.AppBar object (Windows)


    Roy
    MSDN Community Support |

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    I tried using those (created a new project) and added the translations (Pseudo-language here), the app is working but the appbar icons is gone... hmm.. =('

    I can't include image here because I'm not verified... but I am... hmm...

    Some of the code in the default.html file:

    <button 
          data-win-control="WinJS.UI.AppBarCommand" 
          data-win-res="{winControl: {label:'greeting'}}"
          data-win-options="{id:'cmdDelete',icon:'delete',
          section:'global'}">
    </button>
    resources.resjson:
    {
    "greeting"              : "Hello World!",
    "_greeting.comment"     : "This is a comment to the localizer"
    }

    Thursday, January 31, 2013 1:39 PM