Forum Archive

Why Error? Help noob Please

apselon

Image https://www.dropbox.com/s/bs6mk5n2u3at6yr/%D0%A4%D0%BE%D1%82%D0%BE%2012.10.14%2C%2010%2051%2009.png?dl=0

import ui
from ui import *
def raw(sender):
    bon = sender.superview['view1']
    bon.present('sheet', hide_title_bar=True )

def goal(sender):
    bon = sender.superview['view1']
    bon.close()              #error

ui.load_view('point').present('sheet', hide_title_bar=True )

PS Sory for my Eanglish

ccc

You can translate the error message that you are getting as: There no such thing as sender.superview['view1'].

Without seeing your .pyui file, it is difficult to say if this should work, but you can try:

def goal(sender):
    bon = sender.superview  # ['view1']
    bon.close()
apselon

ccc, thank you, it's work