Load RSS/XML feed with ember.js via google jsapi

Ghostwalk

New Member
I am trying to get an xml feed into my app via google jsapi and i get so close but just am at the head banging stage with this error."Uncaught Error: Cannot perform operations on a Metamorph that is not in the DOM."the problem is this line "me.pushObject(t);" how do i access the parent scope from within that function?Am I approaching this wrong is their a WHOLE other way to do this?I can confirm that i am getting the xml back just cant get it out of that function back to ember.i desperation i have tried "App.myController.pushObject(t);" and many other comical solutions.I test with jSOn it 100% works but i have to load an xml rss so thats out.here is a snippet of the problem:...\[code\]App.myController = Ember.ArrayController.create({content: [],init: function(){ me = this; function feedLoaded(result) { me.set('content', []); if (!result.error) { var mObj = []; for (var i = 0; i < result.feed.entries.length; i++) { var cData = http://stackoverflow.com/questions/12521192/result.feed.entries; var t = App.HospTime.create({ title: cData.title, name: cData.name, date: cData.date }); me.pushObject(t); } } else { alert(result.error); } } var feed = new google.feeds.Feed("myrss_feed.xml"); feed.load(feedLoaded);}\[/code\]})....
 
Back
Top