Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis From: cmcmanis@stpeter.Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: RKM: Libs and Devs Message-ID: <130535@sun.Eng.Sun.COM> Date: 22 Jan 90 02:02:44 GMT References: <1990Jan20.042239.12232@athena.mit.edu> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 43 In article <1990Jan20.042239.12232@athena.mit.edu> (Rich Carreiro) writes: >1) there is the line >struct IntuitionBase *IntuitionBase = NULL; > >I was under the impression that Lattice included an IntuitionBase in lc*.lib, >so that this line should be >extern struct etc. etc. Correct, however having your own define is "OK" too as long as all of your subroutines reference the same one. The examples in the RKM seem to be written so that you don't need to link with lc.lib in which case there wouldn't be a define for IntuitionBase. >Also, for the program, the compiler options are given as >-b1 -cfist -L -v -w These options are fine. >Now for the problem. Despite (1) the code compiles and links fine. >However, when I run it, instead of "Our Own Screen" in the title bar, I >get a blank ORANGE titlebar (the screen gadgets ARE drawn and are in their >correct colors). However, the window DOES have "graniteWindow" in its >titlebar. Also, the program works fine and returns all its memory. Yes, it is a pretty stupid BUG on the the part of the code, although harmless. You will notice that in the example the NewScreen structure uses (-1, -1) for the DetailPen and BlockPen, this is completely bogus. In the new WINDOW structure you can use -1 for either the BlockPen or the DetailPen and it will pick them up out of the SCREEN structure, but if you use them in the screen structure it will simply set your two pens to the same color (which in this case is color 3 because that is the highest color available in a two bitplane screen). You will notice that in the NewWindow structure the programmer uses 0, and 1 which allows the title to be read. Note that the title is being rendered in the Screen just with the same background and foreground colors. If you take the 0, 1 out of the NewWindow structure and put it into the NewScreen structure and then put -1, -1 in the NewWindow structure you get the effect the programmer probably intended. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@Eng.Sun.COM These opinions are my own and no one elses, but you knew that didn't you. "If it didn't have bones in it, it wouldn't be crunchy now would it?!"