racket/gui Windows: repair for use-before-initialization

Closes PR 14454

original commit: 7cb9628449db3ea1685c4b9ff5c4099d15d77001
This commit is contained in:
Matthew Flatt 2014-04-19 14:34:57 -06:00
commit 2a00f4a466
2 changed files with 4 additions and 3 deletions

View File

@ -156,6 +156,7 @@
canvas-hwnd))
(define hwnd (or panel-hwnd canvas-hwnd))
(define dc #f)
(super-new [parent parent]
[hwnd hwnd]
@ -244,7 +245,7 @@
0
(default w msg wParam lParam)))
(define dc (new dc% [canvas this] [transparent? (memq 'transparent style)]))
(set! dc (new dc% [canvas this] [transparent? (memq 'transparent style)]))
(send dc start-backing-retained)
(define/public (get-dc) dc)

View File

@ -69,6 +69,8 @@ needed to really make this work:
(define/override (write stream)
(send stream put (string->bytes/utf-8 (format "~s" (marshall-syntax main-stx)))))
(define path '())
(define next-push 0)
(define-values (datum paths-ht) (syntax-object->datum/record-paths main-stx))
(define output-text (new text:hide-caret/selection%))
@ -88,8 +90,6 @@ needed to really make this work:
0
(send text last-position)))
(define path '())
(define next-push 0)
(define/private (push!)
(set! path (cons next-push path))
(set! next-push 0))