racket/gui cocoa: fix crashing bug with combo-field%
Merge to v6.0
(cherry picked from commit 9a120f6acc
)
This commit is contained in:
parent
687ed81d29
commit
c044d0097a
|
@ -692,12 +692,13 @@
|
|||
#t)
|
||||
(define/public (on-combo-select i) (void))
|
||||
(define/public (popup-combo)
|
||||
;; Pending refresh events intefere with combo popups
|
||||
;; Pending refresh events interfere with combo popups
|
||||
;; for some reason, so flush them:
|
||||
(yield-refresh)
|
||||
(flush)
|
||||
;; Beware that the `popUp:' method is undocumented:
|
||||
(tellv (tell content-cocoa cell) popUp: #f))
|
||||
(atomically
|
||||
(tellv (tell content-cocoa cell) popUp: #f)))
|
||||
|
||||
(define clear-bg? (and (not (memq 'transparent canvas-style))
|
||||
(not (memq 'no-autoclear canvas-style))))
|
||||
|
|
|
@ -1708,7 +1708,9 @@
|
|||
(define (combo-frame empty?)
|
||||
(define f (make-frame frame% "Combo Test"))
|
||||
(define p f)
|
||||
(define actual-content '("Apple" "Banana"))
|
||||
(define actual-content (if empty?
|
||||
null
|
||||
'("Apple" "Banana")))
|
||||
(define (callback c e) (void))
|
||||
(define c (make-object (class combo-field%
|
||||
(define/override (on-popup e)
|
||||
|
@ -2402,6 +2404,7 @@
|
|||
(make-object button% "Make Choice Frame" cp (lambda (b e) (choice-or-list-frame #f null #f)))
|
||||
(make-object button% "Make Empty Choice Frame" cp (lambda (b e) (choice-or-list-frame #f null #t)))
|
||||
(make-object button% "Make Combo Frame" cp (lambda (b e) (combo-frame #f)))
|
||||
(make-object button% "Make Empty Combo Frame" cp (lambda (b e) (combo-frame #t)))
|
||||
(define lcp (make-object horizontal-pane% ap))
|
||||
(send lcp stretchable-width #f)
|
||||
(define list-columns-choice (new choice%
|
||||
|
|
Loading…
Reference in New Issue
Block a user