Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!mips!apple!sun-barr!decwrl!orc!bu.edu!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: SetUpA4() and RestoreA4() Message-ID: <2275@husc6.harvard.edu> Date: 19 Mar 90 16:28:31 GMT References: <3819@sage.cc.purdue.edu> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 30 In article <3819@sage.cc.purdue.edu> ar4@sage.cc.purdue.edu (Piper Keairnes) writes: > > Well, I've just converted one of my applications into a DA. All has >gone well except what to do for the SetUpA4() and RestoreA4(). I'm working >with ThinkC 4.0 and using the "DA Main.c" code as instructed so the DA works >fine when run under the ThinkC environment. > > BUT, when I remove the "DA Main.c" file from my project, rename the >"_main" back to "main", compile the project as a desk accessory and then >run it.... > LA BOMBA !! > > So, I placed the SetUpA4() and RestoreA4() pair inside of two functions: >doControl and doClose. Still bombed... If your DA is multiple-segmented, or uses globals, then SetupA4() and RestoreA4() should be used at the beginning and end of main() itself. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "When someone who makes four hundred and fifty dollars an hour wants to tell you something for free, it's a good idea to listen." ~~~~~~~~~~~~~~~