Again, sorry, If this is stupid. But trying to seperate my code for different views I am loading. I did the below code and it seems to work, but I am guessing I am going around it the hard way. Just trying to get each view to have its own code. I hope the code below makes sense, I am finding it very hard to put into words
import ui
import my_customers
def do_customers(sender): # one way (not what i want)
v = ui.load_view('customers')
v.present('sheet')
def do_customers(sender): # 2nd way
'''
my_customers.py has setup function, that just does
v = ui.load_view('customers')
v.present('sheet')
but all the action/functions from the ui items are now local to this my_customers.py , which is what i wanted.
'''
my_customers.setup()
if __name__ == '__main__':
v = ui.load_view('my_main_view')
v.right_button_items = [ui.ButtonItem('Customers', None , do_customers)]
v.present('sheet')