New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateListBox callFunction override #449

Closed
natfast opened this Issue May 3, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@natfast

natfast commented May 3, 2018

Ran into a little snafu with the updateListBox. It calls a function when I don't want it too.

# replace the list items in the list box
    def updateListBox(self, title, items, select=False):
        self.clearListBox(title)
        self.addListItems(title, items, select=select)

The clearListBox function has the following declaration.

 def clearListBox(self, title, callFunction=True):

So I cannot set the callFunction to False.
Work around, do the two calls myself.

       app.clearListBox(title, callFunction=False)
       app.addListItems(title, items, select=False)

Fix: pass in CallFunction and forward it to the clearListBox function.

# replace the list items in the list box
    def updateListBox(self, title, items, select=False, callFunction=True):
        self.clearListBox(title, callFunction=callFunction)
        self.addListItems(title, items, select=select)

@jarvisteach jarvisteach added the bug label May 4, 2018

@jarvisteach jarvisteach added this to the 1.0 milestone May 4, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented May 4, 2018

Will add that to the next build, or feel free to issue a PR...

jarvisteach added a commit that referenced this issue May 5, 2018

Implemented #449
Can now set callFunction on list boxes
Also, new test function for callFunctions
@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented May 5, 2018

This has been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment