original commit: 1827497b5fbdb815355065c19e1c95d1c4afdca2
This commit is contained in:
Matthew Flatt 2002-02-07 21:59:45 +00:00
parent 15ad8c4e5a
commit 3927329583

View File

@ -2870,19 +2870,15 @@
(f x y)
(values (unbox x) (unbox y)))))
(define widget-table (make-hash-table 'weak))
(declare-local-member-name private-wx)
(define mred%
(class100 object% (wx)
(sequence
; (unless (eq? monitor-owner (current-thread)) (error 'init-mred% "not in monitored area"))
(hash-table-put! widget-table this (make-weak-box wx))
(super-init))))
(class object%
(init-field private-wx)
(super-make-object)))
(define (mred->wx w)
; (unless (eq? monitor-owner (current-thread)) (error 'mred->wx "not in monitored area"))
(let ([v (hash-table-get widget-table w (lambda () #f))])
(and v (weak-box-value v))))
(define mred->wx (class-field-accessor mred% private-wx))
(define (mred->wx-container w) (send (mred->wx w) get-container))