c-jo / cpython

RISC OS port of the Python programming language
https://www.python.org/
Other
7 stars 3 forks source link

Bug in !Hyper python demo program #25

Open riscman opened 11 months ago

riscman commented 11 months ago

The ”Previous• button in the status line does not work for some cards. Eg: The Toolbox — Object Templates Tools Tools.!DDT Tools.ResEd Tools.ResTest What these cards have in common is that they have buttons. The cards without buttons return to the previous card when previous is clicked. The cards with buttons do not.

If you delete the three buttons on the DDT card the ”previous• or ”back_handler• button works.

def back_handler(self, event, id_block, poll_block):
    card = self.history.pop() if len(self.history) else None
    self._display(card)

It looks as if the history stack is being corrupted by processing the buttons defined on the card.