sproutcore - todos tutorial, addbutton not responding in firefox

Posted by kristian nissen on Stack Overflow See other posts from Stack Overflow or by kristian nissen
Published on 2009-11-24T21:20:37Z Indexed on 2010/04/04 8:03 UTC
Read the original article Hit count: 351

Filed under:

I'm testing the sproutcore todo's tutorial and I have checked the code in step-5 and it's identical to my code at least as far as I can see, but the addButton is not responding to click events.

addTask: function () {  
    var task;

    task = Sinatra.store.createRecord(Sinatra.Task, {    
      'description': 'New Task',
      'isDone': false,
      'priority': 1
    });

    this.selectObject(task);

    this.invokeLater(function () {    
      var contentIndex = this.indexOf(task);
      var list = Sinatra.mainPage.getPath('mainPane.middleView.contentView')
      var listItem = list.itemViewForContentIndex(contentIndex);
      listItem.beginEditing();
    });

    return YES;

and in the main:

addButton: SC.ButtonView.design({        
          layout: { centerY: 0, height: 24, right: 12, width: 100 },
          title: 'Add Task',
          target: 'Sinatra.tasksController',
          action: 'addTask'
        }),

I can't see the problem, please help.

(I have only tested this in firefox on kubuntu)

© Stack Overflow or respective owner

Related posts about sproutcore