Xref: utzoo comp.sys.mac.programmer:321 comp.lang.lisp:778 Path: utzoo!mnetor!uunet!husc6!bloom-beacon!ht!spt!gz From: gz@spt.entity.com (Gail Zacharias) Newsgroups: comp.sys.mac.programmer,comp.lang.lisp Subject: Re: Allegro CL strangeness; info request Message-ID: <281@spt.entity.com> Date: 24 Mar 88 19:54:43 GMT References: <23403@ucbvax.BERKELEY.EDU> Reply-To: gz@spt.entity.com (Gail Zacharias) Organization: A Kindof Entity, Cambridge, MA Lines: 45 Summary: the requested info In article <23403@ucbvax.BERKELEY.EDU> mkent@dewey.soe.berkeley.edu.UUCP (Marty Kent) writes: >non-Listener) window, I notice in the Allegro manual where is says under >"Drawing Text" (pg. C-7) "Special characters such as return (i.e. from >TERPRI...) have no effect." Return means go to next line. What's a 'next line' in a graphics window? > My first question is, "Who the hell are these >guys supposed to be kidding??" Not being a guy, I guess I'll skip this one... >So, before I go to the trouble of writing something that looks at a window >and does the right thing with scrolling, as well as font size, does >anyone have a working TERPRI for Allegro? This doesn't really have anything to do with TERPRI, TERPRI just asks the window to output a return. Vanilla graphics windows do nothing with the return. It sounds like you're looking for a specialized kind of window which behaves like a 'dumb tty'. This should be fairly easy to implement, you just need to define its stream-tyo function. E.g. (defobject *dumb-tty-window* *window*) (defobfun (stream-tyo *dumb-tty-window*) (char) (if (not (eql char #\Newline)) (usual-stream-tyo char) (with-port wptr (move-to )))) >It seems to me from my bit of experimentation with *eventhook* that a >function bound to the global doesn't in fact get notified of all events. *eventhook* gets all events that the Lisp gets. By default, Macintosh applications don't get mouseUp events. You can request to get them with the _SetEventMask trap. > I wrote a simple function to print out the fields in certain events >as they're detected by event-dispatch. When I grab a window's size >control, it prints the "what" and msg fields, but won't print the "where" >field until I unbutton! Standard output is buffered. No i/o happens while tracking the size control so you only see however much of the buffer managed to get printed out before the tracking started. When you release the button, the rest of the buffer gets printed. Try doing a FINISH-OUTPUT before returning from your function.