Forum Archive

Views newbie

jphilip4

Hi,

I created a view (called Home screen) with multiple buttons. I want to go to a different screen when I press each button. There might be buttons on those screens as well. But I want to always be able to navigate back to the Home screen.

I created a button_pressed function that checks for the sender's title to spawn the new view. But when i use: new view = ui.load_view('Screen2").present, I get an error: "NoneType" object has no attribute 'value'

I have created a Screen2.pyui file which as a button and a few textview objects.

Any advice? Or some links to sample code for this kind of navigation?

Or should I have been using scenes?

thanks,
john

jphilip4

I found this link which was able to answer my question.
https://forum.omz-software.com/topic/3388/free-bible-app-w-source-code

I should have loaded all the views after the function definitions. And then only present the ones I need when the button is pressed on the Home screen which is presented first.

Please correct me if I am wrong.