Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!agate!shelby!portia.stanford.edu!ralphm From: ralphm@portia.Stanford.EDU (Ralph Melton) Newsgroups: comp.sys.mac.programmer Subject: 72 Extra Bytes of Globals? Message-ID: <1990Nov5.184017.17820@portia.Stanford.EDU> Date: 5 Nov 90 18:40:17 GMT Organization: AIR, Stanford University Lines: 31 Can someone wise in the ways of Think Pascal 3.0 tell me what's happening to me? I'm attempting to create an After Dark module in Think Pascal 3.0. An After Dark Module depends on a code resource of type 'ADgm'. When I attempt to build my code resource, I get an error message that says "Too many global variables; you have 72 bytes of globals, you can only have 0." I understand why code resources can't have globals. My qualm with Think's error message is that, to the best of my understanding, I don't have any global variables. I've checked with the "Find..." command; every incidence of the three letters "var" occurs in either a parameter list, a local variable declaration, or a comment. My sole hypothesis is that I am getting these troubles because I am using Object Pascal (not the Think Class Library). After Dark passes the graphics module a handle, which the module can use as it pleases; I'm using it as an object reference to an object that does the drawing. I hypothesize thusly because I earlier wrote a module without objects that compiled without problems and is currently running. Is this correct? Does the use of objects demand global variables? I hugely hope not, because objects are the really excellent way to do what I want to do, and casing on tag fields of variant records would be a huge hassle. Any help would be gratefully appreciated. Ralph Melton -- Ralph Melton ralphm@portia.stanford.edu