[plt-scheme] Return Value

From: Paulo J. Matos (pocm at mega.ist.utl.pt)
Date: Sun Sep 8 21:15:32 EDT 2002

Hi all,

I'm doing a graphical interface that was suggested in my last
mail to the list.
Somehow I got myself into a mess.

I have a function like the following that should return a struct
of type tran:
(define read-tran-gui
 (lambda ()
    (define rtframe
      (instantiate frame% ()
        (label "New Transaction")))

(instantiate button% ()
      (label "Insert Transaction")
      (parent rtframe)
      (callback (lambda (button event) 
                   (string->number (send tbamount get-value))
                   (if (eq? (send rad-type get-selection)
                   (send tbcomment get-value))
                  (send rtframe show #f))))
    (send rtframe show #t)))

The function needs to return the value returned by make-new-tran
called in the callback function of the button. How can I do that?

Best regards,

Paulo J. Matos : pocm(_at_)mega.ist.utl.pt
Instituto Superior Tecnico - Lisbon    
Software & Computer Engineering - A.I.
 - > http://mega.ist.utl.pt/~pocm 
	Yes, God had a deadline...
		So, He wrote it all in Lisp!

Posted on the users mailing list.