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
write a FilePickerCtrl component #11
Comments
Ah, actually, the only way to add new primitive components is to fork the re-wx repo, right? Because |
I take it back, the |
I'm pretty sure this is essentially an implementation of Haskell or PureScript “typeclasses” in Python. Lines 4 to 8 in 882967e
|
Yeah, correct. You can see a few examples of it in use in Gooey.
Oh, interesting. I hadn't thought of it that way. The motivation here was primarily multi-methods from Clojure. They're definitely clumsier than typeclasses because of how Python treats its objects. There's actually a builtin version of this dispatch thing in functools called @singledispatch. However, it only works correctly for instances of types, which have the class Foo:
pass
print(type(Foo()) # <class '__main__.Foo'>
print(type(Foo)) # <class 'type'> This quirk breaks the builtin |
I want to write a
FilePickerCtrl
component. Any advice?It seems like writing new primitive components is a bit awkward because the
re.widgets.set_basic_props
function has no way to amend theexclusions
map. So I have to either fork re-wx or make a newset_basic_props
function. Do I have that right?The text was updated successfully, but these errors were encountered: