Closed jkirkell closed 12 years ago
Jeff, can you describe your problem with fragments of code? Here's a simple example, but you can try to use a documentation too:
class App.Collections.Dreams extends Backbone.Collection
model: App.Models.Dream
url: '/api/dreams'
initialize: ->
@storage = new Offline.Storage('dreams', this)
Real quick, and sorry for the delay but is the sample CoffeeScript? I will paste some code this weekend.
@jkirkell Yes, the samples provided by @Ask11 and on the README are in CoffeeScript. So in firefox when you try the above, it doesn't recognize the CoffeeScript characters and gives you that "XML name" error. Here's the equivalent in javascript:
var App.Collections.Dreams = Backbone.Collection.extend({
model: App.Models.Dream,
url: '/api/dreams',
initialize: function() {
this.storage = new Offline.Storage('dreams', this);
}
});
Thanks @michaelcox for answer. I think we can finish with this issue.
This may just me missing something but I added a reference to a test application I am working on and used the sample code but when I try to set a variable like the example @storage = Offline.Storage("questions", this) I get the following: reference to undefined XML name
If I set it to a standard variable it works but I am not sure if this is just me doing something wrong or not.
I am using the current master version of backbone_offline.js and backbone-0.9.2.js
Thanks, Jeff