[plt-scheme] test:get-active-frame Problem

From: Shawn Legrand (splegrand at yahoo.com)
Date: Sun Mar 16 15:56:52 EST 2003

When trying to run the frame fact example in section 3.3.1 of the PLT Framework: GUI Application Framework manual I am receiving an error message: reference to undefined identifier: test:get-active-frame. I have the (require (lib "framework.ss" "framework"))statement, in fact if I remove that statement I then fail on the test:new-window statement, so it appears the require is functioning correctly.. I have looked at test.ss and it appears to me that the get-active-frame define is in there and should be OK (but I am a newbie to DrScheme so that may mean little). I have searched the list archive with no hits.

Here is my code:

(require (lib "framework.ss" "framework")) 
(define go
    (lambda ()
      (sleep 3)
      (test:new-window (get-panel '(0 0 0 1)))       ; definitions canvas
      (test:menu-select "Edit" "Select All")
      (test:menu-select "Edit" "Delete")
      (type-line "(define fact")
      (type-line "(lambda (n)")
      (type-line "(if (zero? n)")
      (type-line "1")
      (type-line "(* n (fact (sub1 n))))))")
      (test:button-push (get-panel '(0 0 0 0 5 0)))  ; check-syntax button
      (test:button-push (get-panel '(0 0 0 0 5 3)))  ; execute button
      (sleep 3)
       (type-line "(fact 4)")
      (sleep 1)
      (printf "Test complete. Pending actions: ~s~n" 
              (test:number-pending-actions))))

  (define type-line
    (lambda (str)
      (for-each test:keystroke (string->list str))
      (test:keystroke #\return)))

  (define get-panel
    (lambda (path)
      (let loop ([path  path] 
                 [panel (send (test:get-active-frame) get-top-panel)])
        (if (null? path)
            panel
            (loop (cdr path) 
                  (list-ref (ivar panel children) (car path)))))))


I am running language Pretty Big (includes MrEd and Advanced) at version 203.

Any help would be appreciated.


Shawn Legrand 
Carpe Noctem! Carpe Diem! Hieros Gamos!
splegrand at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20030316/6e136043/attachment.html>

Posted on the users mailing list.