locked
Error after upgrading to Win8 Release and Vs2012

    Question

  • My stack trace does not seem to help.  I get this error when I try and drill down into a table by calling another JSON web service.  Any clue?  I can't find any reasonable notes on what might cause this now when it was working before.  I do have an IFrame in the page it seems to be crashing on.  Do I need to do anything special for an IFRame to work now that I did not do before?

    0x800a139e - JavaScript runtime error: WinJS.Utilities.requireSupportedForProcessing: Value is not supported within a declarative processing context, if you want it to be supported mark it using WinJS.Utilities.markSupportedForProcessing. The value was: '[object HTMLIFrameElement]'


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider

    Thursday, August 16, 2012 5:38 AM

All replies

  • Yes. WinJS strict processing is now mandatory. See the Migrating your Release Preview app to Windows 8 white paper for details.
    Thursday, August 16, 2012 5:43 AM
    Owner
  • I don't see any mention of need to use the call below and how it might be effective on my app in the release notes.  All my js has strict mode defined in it before so I'm not sure that effects me in any way.

    WinJS.Utilities.markSupportedForProcessing


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider

    Thursday, August 16, 2012 2:10 PM
  • For functions used declaratively you have to define them with 'markSupportedForProcessing' for RTM.  The alternative is not to use the function declaratively (assign it after processAll);

    Jeff Sanders (MSFT)

    Thursday, August 16, 2012 6:17 PM
    Moderator
  • I'm not quite following.

    In my "ready:" label of my grid page (see code below) I have a WinJS.xhr call that in it's success event I do:

    listView.selection.set(Math.max(that.itemSelectionIndex, 0));

    and it seems to crash on that line with the exception.

    Could you give me an example syntax for how I would avoid that?  I thought this was all called from inside the processAll()

     var that = this;
                var formParams = 'addressBookEntryId=' + options.item.Id;
                WinJS.xhr({
                    type: "post",
                    url: AE.Constants.baseUrl + "EmailDetail/GetEmailByPerson",
                    headers: { "Content-type": "application/x-www-form-urlencoded" },
                    data: formParams,
                    scope: that
                }).then(function (xhr) {

     ui.Pages.define("/pages/split/split.html", {
    
            /// <field type="WinJS.Binding.List" />
            items: null,
            /// <field type="Object" />
            group: null,
            itemSelectionIndex: -1,
    
            // This function checks if the list and details columns should be displayed
            // on separate pages instead of side-by-side.
            isSingleColumn: function () {
                var viewState = Windows.UI.ViewManagement.ApplicationView.value;
                return (viewState === appViewState.snapped || viewState === appViewState.fullScreenPortrait);
            },
    
            // This function is called whenever a user navigates to this page. It
            // populates the page elements with the app's data.
            ready: function (element, options) {


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider

    Thursday, August 16, 2012 6:36 PM
  • Where does: Math.max come from?  Can you post a simple repro?  It does not seem that the error relates to the line you specified.

    Jeff Sanders (MSFT)

    Friday, August 17, 2012 1:22 PM
    Moderator
  • Had the same problem migrating a RP apps to RTM.

    Here how I solved it:

    // Before
    groupDataSelector: function (item) {
       return {
           titre: item.group.titre,
           imagemedium: item.group.imagemedium,
           click: function () {
               nav.navigate("/html/groupDetailPage.html", { group: item.group });
           }
       };
    },
    // After
    groupDataSelector: function (item) {
         var classGroup = {};
         classGroup.init = function (itemgroup) { this.itemgroup = itemgroup; this.titre = itemgroup.titre; this.imagemedium = itemgroup.imagemedium; }
         classGroup.click = function () { nav.navigate("/html/groupDetailPage.html", { group: this.itemgroup }); }
         classGroup.init(item.group);
         WinJS.Utilities.markSupportedForProcessing(classGroup.click);
         WinJS.Utilities.requireSupportedForProcessing(classGroup.click);
         return classGroup;
    },

    Hope it could help.

      Lionel


    Wednesday, August 22, 2012 4:06 PM
  • Dear Peter,

    did you managed the mentioned problem in connection to an iframe?

    Maik

    Friday, August 24, 2012 9:50 AM