Hi,

Instead of redefining the 'listen' word, you can store a quotation in  
the listener-hook variable.

Also defining a word : foo-on foo on ; is totally redundant. It is  
not more readable and does not save keystrokes either.

Slava

On 13-Feb-07, at 7:32 PM, Eduardo Cavazos wrote:

> Hello,
>
> A problem with the listener mod I shared yesterday is that the  
> stack display
> and stdio output get run together. You can't tell where the output  
> ends and
> where the stack display begins. This mod fixes that problem. In  
> addition,
> I've also added the retain stack to the display. Lastly, you can  
> turn off the
> stack display with stack-display-off and turn it back on with
> stack-display-on. I have this code in a file called "listener- 
> mod.factor". To
> enable the mod you should be able to just run-file it.
>
> Ed
>
> ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
> !!
> USING: kernel errors io namespaces tools ;
>
> IN: listener
>
> SYMBOL: stack-display
>
> : stack-display-on ( -- ) stack-display on ;
>
> : stack-display-off ( -- ) stack-display off ;
>
> : (print-stacks) ( -- ) "----------\n" write .s "----------\n"  
> write .r ;
>
> : print-stacks ( -- ) stack-display get [ (print-stacks) ] when ;
>
> : listen ( -- )
> [ stdio get parse-interactive [ call print-stacks ] [ bye ] if* ]  
> try ;
>
> stack-display-on
> ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
> !!
>
> ---------------------------------------------------------------------- 
> ---
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to