Hi- I modified my copy of EasyWindow as Kevin Reid suggested. Here is what I did: In the subroutine DRAWING, change $draw = $str; into $draw = eval "sub $str }"; In the subroutine WINDOW, where the redraw hook is defined, change val( $draw ) into &{ $draw } --Quentin ----- Original Message ----- From: "Alan Fry" <ajf@afco.demon.co.uk> To: "MacPerl Toolbox" <macperl-toolbox@macperl.org> Sent: Tuesday, June 27, 2000 6:06 AM Subject: Re: [MacPerl-Toolbox] QuickDraw and MacWindows > At 5:14 pm -0400 26/06/00, Kevin Reid wrote: > > >Looks pretty good, except that you could use a subroutine reference > >rather than eval()ing the code every time. > > I'm sure you are right, but how exactly do you sidestep the need for > an eval() in this situation? > > It would be nice to avoid the klunky syntax "DRAWING(q(...));". Any > ideas? If the space following DRAWING() were a TE field you could > 'get' the contents as a string without explicit quotes. Is there any > way of doing that surreptitiously under the covers? > > Alan Fry > > ==== Want to unsubscribe from this list? > ==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org > ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to macperl-toolbox-request@macperl.org