如何从选择器值中选择索引?

时间:2016-08-10 14:15:17

标签: javascript appcelerator

我正在使用Appcelerator构建应用。 所以我使用了Picker组件来显示值列表。

现在我想知道用户选择的元素索引是什么。

所以我试着这样做:

var indexRow =$.comboDecription.getSelectedRow(0).getZIndex();

但是我有未定义的价值。

2 个答案:

答案 0 :(得分:3)

您可以使用以下代码:

---------------------------
Error
---------------------------
C:\Anaconda2\lib\site-packages\xlwings\main.py:2692: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

  throw = (os.path.normpath(os.path.realpath(impl.fullname.lower())) != os.path.normpath(fullname.lower()))

Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File "test.py", line 13, in plot_chart

    wb = xw.Book.caller()

  File "C:\Anaconda2\lib\site-packages\xlwings\main.py", line 545, in caller

    return cls(impl=app.books.open(fullname).impl)

  File "C:\Anaconda2\lib\site-packages\xlwings\main.py", line 2695, in open

    "Cannot open two workbooks named '%s', even if they are saved in different locations." % name

ValueError: Cannot open two workbooks named 'test.xlsm', even if they are saved in different locations.

我知道这是一个漫长的过程,但还有其他方法取决于您的实施过程。不过,我已经向你展示了你在运行时可以做的事情,所以你可以做其他与采摘有关的事情。

答案 1 :(得分:0)

gZindex()返回视图所在的图层。 更改事件会返回当前选定的索引。