Skip to content
Discussion options

You must be logged in to vote

wx.YieldIfNeeded() seems to help, I also fixed the assert mentioned above in the latest refresh build, though I need to test this more

try

import wx
from pyrx import command, Ed, Ap


class MyFrame(wx.Frame):
    def __init__(self, parent, title):
        super().__init__(parent, title=title)
        self.panel = wx.Panel(self)
        self.button = wx.Button(self.panel, label="Start Long Task")
        self.button.Bind(wx.EVT_BUTTON, self.on_start_task)
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.button, 0, wx.ALL | wx.CENTER, 5)
        self.panel.SetSizer(sizer)
        self.CenterOnParent()

    def on_start_task(self, event: wx.Event):
        max_steps = 100

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@gswifort
Comment options

gswifort May 12, 2025
Collaborator Author

Comment options

gswifort
May 12, 2025
Collaborator Author

You must be logged in to vote
6 replies
@gswifort
Comment options

gswifort May 12, 2025
Collaborator Author

@CEXT-Dan
Comment options

@gswifort
Comment options

gswifort May 12, 2025
Collaborator Author

@CEXT-Dan
Comment options

Answer selected by gswifort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants