Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!olivea!decwrl!ucbvax!van-bc!ubc-cs!fornax!mcdonald From: mcdonald@fornax.UUCP (Ken Mcdonald) Newsgroups: comp.sys.next Subject: How to do Windows in Allegro Common Lisp? Keywords: ARGHHHH!! Help, help, oh please HELP!! (Cough, gurgle, choke, urrghh...) Message-ID: <2381@fornax.UUCP> Date: 29 Mar 91 06:17:28 GMT Organization: School of Computing Science, SFU, Burnaby, B.C. Canada Lines: 48 Here I sit, with approximately thirty pounds of documentation in front of me, and without a clue as how to do this... I'm learning (well, trying) to use Allegro Common Lisp on the Next, to produce Next-style applications. The first step is to be able to 1) Create a window. 2) Show it on the screen. 3) Move it around from within the code. 4) Get rid of it. As you might have guessed, I'm currently on step 0) Contact the UseNet for help. So, to begin; I've loaded in all the necessary packages (objc, appkit, all that good stuff.) Then, I type this. (setq w (send Window "new)) whereupon I am informed that the "new" method does not exist for windows. (By the way, stick another " in after that in the code--yes, I did it correctly when I was typing in Lisp.) Look things up in the objective-C documentation, and sure enought, there is no "new" method for windows. (And why not, I'd like to know?) Well, init looks like it might do the trick. So, type (setq w (send Window "init")) and I get back a message indicating that an objective-C object has been returned, hooray! However, I don't know what kind of object because I don't understand the descriptions ACL gives of returned objects (and don't know where to find and explanation in the docs, if an explanation exists at all), and I'm suspicious by nature. So, to verify that w holds a window object, I type (send w "buttonMask") which any true window should respond to. Uh-oh, bad news, as ACL informs me that the "buttonMask" message isn't implemented for that object. "style", another window message, also isn't recognized. Whatever w is, it certainly isn't a window. So I try to find out what w is. There are a couple of ways to do this in ACL (the "isa" function is one), and I try the ones I know about. Sadly, slightly different types are returned, and I can't understand what they mean anyways. (What the heck is a "metaclass" and how does it differ from a superclass anyway?) My head aswim with strange concepts, I finally turn to the fine people in the UseNet for help. So can you help this poor, struggling, aspiring NeXT programmer? What I want to do seems so simple, and yet I haven't a clue as to how to go about it, or what I am doing wrong. Please note--I want to create the window entirely from within the Lisp code, and not by setting it up in Interface Builder and then just sending messages to it. Any comments, ideas, hints, advice, or solutions gratefully accepted. Post here or e-mail to Ken McDonald mcdonald@cs.sfu.ca .