Extra line breaks inserted in MrEd text%
- by Jesse Millikan
In a DrScheme project, I'm using a MrEd editor-canvas% with text% and inserting a string from a literal in a Scheme file. This results in an extra blank line in the editor for each line of text I'm trying to insert. Is this a Windows vs. Unix linebreak problem? I can't find anything about text% treats line breaks in the documentation.
; Inside a class definition:
(define/public (edit-pattern p j b d h)
(send input-beat set-value (number->string b))
(send input-dwell set-value (number->string d))
(send hold-beats set-value (number->string h))
(send juggler-t erase) ; Why do these add extra newlines
(send juggler-t insert j)
(send pattern-t erase)
(send pattern-t insert p))
(define juggler-ec (new editor-canvas% [parent this] [line-count 12]))
(define juggler-t (new text%))
(send juggler-ec set-editor juggler-t)
(define pattern-ec (new editor-canvas% [parent this] [line-count 20]))
(define pattern-t (new text%))
(send pattern-ec set-editor pattern-t)
; Lots of other stuff...