0 Replies Latest reply on Feb 27, 2008 3:06 PM by pirco

    AIR + Spry

    pirco
      //var request = new air.URLRequest("data_file.xml");
      //var loader = new air.URLLoader();
      //loader.addEventListener(air.Event.COMPLETE, completeHandler);
      //loader.load(request);

      //function completeHandler(event){
      // var dataXML = event.target.data;
      var dsProjects = new Spry.Data.XMLDataSet("path_to_data.xml", "/projects/project");
      var dsItems = new Spry.Data.NestedXMLDataSet(dsProjects, "items/item");
      //}

      the code above works fine in my local HTML test but when I want to get it to work with spry in my AIR app – and uncomment the code as well as update the path_to_data.xml with the dataXML var – I get an error pointing to the SpryData.js file (the line about "ds.getParentDataSet").
      note that I was able to trace the XML so it seems to load properly but somehow my datasets don't work...
      any advise would be helpful. the error message reads "TypeError: Null value".

      thanks!