Объект «Кнопка» не поддерживает назначение элементов, используется функция EVAL. ⇐ Python

Программы на Python
Anonymous
Объект «Кнопка» не поддерживает назначение элементов, используется функция EVAL.

Сообщение Anonymous »

Я хочу выполнить с помощью eval()
Журнал ошибок НАЖМИТЕ:

Код: Выделить всё

'Button' object does not support item assignment
Код для выполнения:

Код: Выделить всё

       self.E([0,0])['text'] = 'MY FIRST CLICK EVENT'
Класс:

Код: Выделить всё

from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.storage.jsonstore import JsonStore
from kivy.graphics import Color, Rectangle
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.properties import StringProperty, ObjectProperty
from engine.editor.networking import Networking

class EngineLayout(BoxLayout):
# This is root app class container. I need to pass all needed staff
# from main-editor or make copy of main-editor and remove unused code.
def getSceneSize(self):
return len(self.children)

def getAppSceneElements(self):
return self.children

def getSceneElementByIndex(self, index):
return self.children[index]

def deepSearch(self, currContainer, index):
# print("test currContainer.children ", currContainer.children)
res =  currContainer.children[::-1]
if len(res) 

Подробнее здесь: [url]https://stackoverflow.com/questions/79044588/button-object-does-not-support-item-assignment-eval-func-used[/url]

Вернуться в «Python»