Created
December 8, 2009 00:41
-
-
Save lsiden/251316 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_item: function() { | |
// create new LedgerEntry and add it to the list | |
var that = this; | |
var ledger_entry = EccapCalc.store.createRecord(EccapCalc.LedgerEntry, { | |
ledger: that.ledger, | |
}); | |
// select new LedgerEntry in UI | |
this.selectObject(ledger_entry); | |
// activate inline editor once UI can repaint | |
this.invokeLater(function() { | |
var contentIndex = this.indexOf(ledger_entry); | |
var view = EccapCalc.mainPage.getPath(path_to_view + '.description.contentView'); | |
var listItem = view.itemViewForContentIndex(contentIndex); | |
listItem.beginEditing(); | |
}); | |
return YES ; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment