<P>Thanks for your quick response. That explains a lot.
<P> <B><I>Robby Findler <robby@cs.uchicago.edu></I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">The problem is with the example, which has been since removed from the<BR>framework manual (It should not have gone out with v203). There is no<BR>test:get-active-frame anymore, instead use get-top-level-focus-window,<BR>which is now a builtin function.<BR><BR>In general, this example is manipulating DrScheme it self, which means<BR>that the code cannot be run from the definitions window, but that it<BR>must be run from a privaledged place that is only available for<BR>debugging DrScheme, so the example is of little use. Hopefully, you can<BR>make a simple example yourself, based on the app you want to test. Let<BR>me know if you get stuck.<BR><BR>Robby<BR><BR>At Sun, 16 Mar 2003 12:56:52 -0800 (PST), Shawn Legrand wrote:<BR>> ------------------------------------------------------------------------------<BR>> <BR>> When trying to run the frame fact example in section 3.3.1 of the PLT Framework: GUI <BR>> Application Framework manual I am receiving an error message: reference to undefined <BR>> identifier: test:get-active-frame. I have the (require (lib "framework.ss" <BR>> "framework"))statement, in fact if I remove that statement I then fail on the test:new-<BR>> window statement, so it appears the require is functioning correctly.. I have looked at <BR>> test.ss and it appears to me that the get-active-frame define is in there and should be <BR>> OK (but I am a newbie to DrScheme so that may mean little). I have searched the list <BR>> archive with no hits.<BR>> <BR>> Here is my code:<BR>> <BR>> (require (lib "framework.ss" "framework")) <BR>> (define go<BR>> (lambda ()<BR>> (sleep 3)<BR>> (test:new-window (get-panel '(0 0 0 1))) ; definitions canvas<BR>> (test:menu-select "Edit" "Select All")<BR>> (test:menu-select "Edit" "Delete")<BR>> (type-line "(define fact")<BR>> (type-line "(lambda (n)")<BR>> (type-line "(if (zero? n)")<BR>> (type-line "1")<BR>> (type-line "(* n (fact (sub1 n))))))")<BR>> (test:button-push (get-panel '(0 0 0 0 5 0))) ; check-syntax button<BR>> (test:button-push (get-panel '(0 0 0 0 5 3))) ; execute button<BR>> (sleep 3)<BR>> (type-line "(fact 4)")<BR>> (sleep 1)<BR>> (printf "Test complete. Pending actions: ~s~n" <BR>> (test:number-pending-actions))))<BR>> <BR>> (define type-line<BR>> (lambda (str)<BR>> (for-each test:keystroke (string->list str))<BR>> (test:keystroke #\return)))<BR>> <BR>> (define get-panel<BR>> (lambda (path)<BR>> (let loop ([path path] <BR>> [panel (send (test:get-active-frame) get-top-panel)])<BR>> (if (null? path)<BR>> panel<BR>> (loop (cdr path) <BR>> (list-ref (ivar panel children) (car path)))))))<BR>> <BR>> <BR>> I am running language Pretty Big (includes MrEd and Advanced) at version 203.<BR>> <BR>> Any help would be appreciated.<BR>> <BR>> <BR>> Shawn Legrand <BR>> Carpe Noctem! Carpe Diem! Hieros Gamos!<BR>> splegrand@yahoo.com<BR>> ------------------------------------------------------------------------------<BR>> <BR>> When trying to run the frame fact example in section 3.3.1 of the PLT Framework: GUI <BR>> Application Framework manual I am receiving an error message: reference to undefined <BR>> identifier: test:get-active-frame. I have the (require (lib "framework.ss" <BR>> "framework"))statement, in fact if I remove that statement I then fail on the test:new-<BR>> window statement, so it appears the require is functioning correctly.. I have looked at <BR>> test.ss and it appears to me that the get-active-frame define is in there and should be <BR>> OK (but I am a newbie to DrScheme so that may mean little). I have searched the list <BR>> archive with no hits.<BR>> <BR>> Here is my code:<BR>> <BR>> (require (lib "framework.ss" "framework")) <BR>> (define go<BR>> (lambda ()<BR>> (sleep 3)<BR>> (test:new-window (get-panel '(0 0 0 1))) ; definitions canvas<BR>> (test:menu-select "Edit" "Select All")<BR>> (test:menu-select "Edit" "Delete")<BR>> (type-line "(define fact")<BR>> (type-line "(lambda (n)")<BR>> (type-line "(if (zero? n)")<BR>> (type-line "1")<BR>> (type-line "(* n (fact (sub1 n))))))")<BR>> (test:button-push (get-panel '(0 0 0 0 5 0))) ; check-syntax button<BR>> (test:button-push (get-panel '(0 0 0 0 5 3))) ; execute button<BR>> (sleep 3)<BR>> & nbsp; (type-line "(fact 4)")<BR>> (sleep 1)<BR>> (printf "Test complete. Pending actions: ~s~n" <BR>> (test:number-pending-actions))))<BR>> <BR>> (define type-line<BR>> (lambda (str)<BR>> (for-each test:keystroke (string->list str))<BR>> (test:keystroke #\return)))<BR>> <BR>> (define get-panel<BR>> (lambda (path)<BR>> (let loop ([path path] <BR>> [panel (send (test:get-active-frame) get-top-panel)])<BR>> (if (null? path)<BR>> panel<BR>> (loop (cdr path) <BR>> (list-ref (ivar panel children) (car path)))))))<BR>> <BR>> I am running language Pretty Big (includes MrEd and Advanced) at version 203.<BR>> <BR>> Any help would be appreciated.<BR>> <BR>> Shawn Legrand <BR>> Carpe Noctem! Carpe Diem! Hieros Gamos!<BR>> splegrand@yahoo.com </BLOCKQUOTE><BR><BR>Shawn Legrand <br>Carpe Noctem! Carpe Diem! Hieros Gamos!<br>splegrand@yahoo.com