0

I am using Template10. I am utilizing a ListView. The ViewModel needs to know the SelectedItems. The SelectedItems should be passed as a parameter with a converter. EventTriggerBehavior EventName="SelectionChanged" is tested working. The converter is tested working. DelegateCommand> SelectionChangedCommand is NOT working. DelegateCommand of anything is NOT working (no string, no int - no nothing). DelegateCommand SelectionChangedCommand is tested working. Only DelegateCommands without parameter are working when ListView -> EventTriggerBehavior -> InvokeCommandAction Any ideas?


Python (3.3): UnboundLocalError: local variable referenced before assignment

Whenever I start my game and let's say for example I enter 1,4 as the grid reference it will reply with

"UnboundLocalError: local variable 'of' referenced before assignment"

How can I fix this?

Code (edited to for brevity):

import time
while 1==1:
    cont=1
    while cont==1:

        of="-"
        tf="-"
        rf="-"
        ov="-"
        tv="-"
        rv="-"
        os="-"
        ts="-"
        rs="-"
        go=1
...
4

1 回答 1

1

我想我找到了解决方案。
我更改了转换器,以便它返回 aList<string>而不是IList<object>. 看起来ViewModel 中的 与来自转换器/ListView 的DelegateCommand<T>不匹配,尽管是. 此外,我改变了概念,现在删除按钮获取所选项目的列表,其中保存了一些代码、事件和双重列表。<T>ListView.SelectedItemsIList<object>

于 2016-02-18T12:10:36.347 回答