Open earldean opened 9 years ago
Also message-box/custom
.
I think the reason I didn't add a type for this may have been that the mixin argument was hard to type. If that's the case, I may just specify Bottom
for that argument and see if it works.
The relevant code uses the :#mixin
argument, sadly.
Also, message-box
does have a type AFAICT.
> message-box
- : (->* (String String)
((U False (Instance Frame%) (Instance Dialog%))
(Listof (U 'caution 'stop 'ok 'ok-cancel 'yes-no 'no-icon))
#:dialog-mixin
Nothing)
(U 'ok 'cancel 'yes 'no))
Yes, I was having trouble typing the mixin that it uses.
I was able to add the types for these mixin arguments after some TR fixes, but unfortunately actually applying it to a mixin doesn't work right now (I think there is either some subtyping or inference case missing). Also the type prints horribly long. So it'll be a while longer before this is supportable.
These types for message-box\custom and message+check-box\custom typed-checked successfully.
[message-box/custom (->* [String String (U String (Instance Bitmap%) False) (U String (Instance Bitmap%) False) (U String (Instance Bitmap%) False)] [(U (Instance Frame%) (Instance Dialog%) False) (Listof (U 'stop 'caution 'no-icon 'number-order 'disallow-close 'no-default 'default=1 'default=2 'default=3)) (U Any False)
[message+check-box/custom (->* [String String String (U String (Instance Bitmap%) False) (U String (Instance Bitmap%) False) (U String (Instance Bitmap%) False)] [(U (Instance Frame%) (Instance Dialog%) False) (Listof (U 'stop 'caution 'no-icon 'number-order 'disallow-close 'no-default 'default=1 'default=2 'default=3)) (U Any False)
message-box does not have a type in typed/racket/gui