在Dashcode应用程序中的列表中编辑数据 [英] Editing the data in a List in a Dashcode app

查看:67
本文介绍了在Dashcode应用程序中的列表中编辑数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个包含列表的Dashcode应用。我想用我的数据填充此列表,但是当我定义函数时

I’m writing a Dashcode app that contains a list. I’d like to populate this list with my data, but when I define the function

function populate_list()
{
    var list = document.getElementById("list");
    list.setDataArray(test_data);
    list.reloadData();
}

我得到一个错误;我认为原因是 list 在这种情况下是普通的HTML ul 元素,而不是精美的< Apple定义的code> DC.List 类。如何以一种可以使用其方法并访问其属性的方式访问列表?

I get an error; I think the reason is that list in this context is a normal HTML ul element and not an instance of the fancy DC.List class that Apple has defined. How can I access my list in such a way that I can use its methods and access its properties?

推荐答案

事实证明,我想做


var list = document.getElementById( list)。object;

这篇关于在Dashcode应用程序中的列表中编辑数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆