Closed robertmlinden closed 6 years ago
What you're doing should work - the pagedWindow
wouldn't get closed until the function returns.
So there must be something else in your code, that hasn't closed a container properly?
This seems to work fine:
from appJar import gui
def create_page(pos):
with app.page(sticky='news', stretch='both'):
app.label(pos, bg=app.RANDOM_COLOUR())
with gui(font=20) as app:
with app.pagedWindow('title'):
for i in range(10):
create_page(i)
Ok, that's quite odd since when I changed syntax to start/stop it began to work. I'll play around with it more.
Closing this, as don't think it's an issue.
I'm not sure if this is by design, but here's an example of what's breaking.
If I want to split the code for creating a
page
within apagedWindow
into a separate function, I can't. Here's an example:The error I receive is ...line 5257, in stopFrame self._getContainerProperty('type')) Exception: ("Can't stop a FRAME, currently in:", 44)