Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: MacsBug dcmd's in ThinkC Message-ID: <10293@hoptoad.uucp> Date: 17 Feb 90 00:54:38 GMT References: <6650@internal.Apple.COM> <2933@draken.nada.kth.se> <10246@hoptoad.uucp> <2952@draken.nada.kth.se> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 64 In article <2933@draken.nada.kth.se> d88-jwa@nada.kth.se (Jon W{tte) writes: >>>THINK C is better than MPW in handling standalone code reources... In article <10246@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >>I *definitely* don't agree with that... In article <2952@draken.nada.kth.se> d85-jem@nada.kth.se (Jan-Erik M}ngs) writes: >You are right on most points, but I don't think that was what Jon >ment. In THINK C 3.x and 4.0 you can write code resources with >globals without the need of anything like "MakeA5World" described in >TN 256 (THINK C uses A4). I guess I've never really seen the difficulty. I wrote several global-using code resources in MPW C 1.0; actually, I think the first one used the beta version. It's not now and never has been a big deal to do. Now that Apple has told you how to do it and given example code, it's as easy as it is in THINK C. >In 4.0 you can also write segmented code >resources and you can do them object-oriented. How do you do that in >MPW? As fas as I know, MPW C++ and Object Pascal can only be used for >applications... I tried to use THINK C's multi-segment resources. I simply could not get anything using function pointers to work. In any case, MPW lets you link code resources bigger than 32K, so who needs multiple segments? I think object-oriented programming is a fad, and I no longer use it myself, but since you can have globals in MPW, you can use C++ in code resources. I believe Keith Rollin has spelled out exactly how to do this here. >>you've got to ResEdit the resources from one file to the next by >>hand, a very tedious operation. > >THINK C 4.0 has a check box named "Merge" that you can use when you >save your resource. No needs for ResEdit anymore... That's nice; I assume this works similarly to "Rez -a" in MPW. But you omitted the other problem I mentioned. You still have to do one build operation per code resource, which involves closing a project, opening a new project, giving a Make:Use Disk command (since cooperating code resources usually share include files), waiting for that to complete, then giving a Build Whatever command, then checking the destination folder, then overriding the existing file, then waiting for the Build to finish, then repeating for the next code resource. Not only is there a lot to do, but you have to watch the computer at every phase waiting for your next action to come up. The same operation might take half again to two times as long in MPW, but you can leave the computer while it's happening; all you have to do is give a single Build command (Cmd-B, type name of target (usually "all"), hit return) and let it fly. The actual time elapsed may be somewhat longer, but all that time is yours, whereas very little of it is free time in THINK C. THINK C is suffering from a false economy of time. It's also giving you plenty more opportunities to shoot yourself in the foot. "Let's see, did I already rebuild the LDEF or not? I better do it again just to make sure." No such problem with makefiles. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "`Truth' never set anyone free. It is only *doubt* which will bring mental emancipation." -- Anton LaVey, quoted by Arthur Lyons, SATAN WANTS YOU