[racket] A bug in text%

From: Ivanyi Peter (pivanyi at freemail.hu)
Date: Thu Oct 13 03:22:19 EDT 2011

Hi All, There is a bug in the text% widget when handling TABs.In the attached code I have to use a list to specify the TAB positions.(The code does not allow me to specify a vector.)However when I try to insert a text containing a tabulator DrRackettells me: vector-ref: expects type <vector> as 1st argument, given: &#39;(100 200 300 400 500 600 700 800 900 1000 100); other arguments were: 0 I think it is a bug. Peter Ivanyi ---------------------------------------------------------------------------- #lang racket

(require (lib "class.ss")
         (lib "mred.ss" "mred")

(define win (new frame% (label "test")))
(define t1 (new text%))
(define canvas (new editor-canvas% (parent win)
                                   (editor t1)
                                   (style &#39;(control-border))
(send t1 set-tabs &#39;(100 200 300 400 500 600 700 800 900 1000 100) 1 #t)
(send t1 insert "Hello\tWorld")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111013/fc795494/attachment.html>

Posted on the users mailing list.