Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!isgate!krafla!ebth From: ebth@rhi.hi.is (Eggert Bjarni Thorlacius) Newsgroups: comp.sys.mac.programmer Subject: DATA rsrc in my DA Message-ID: <2460@krafla.rhi.hi.is> Date: 29 Nov 90 18:59:34 GMT Organization: University of Iceland Lines: 26 I wrote a DA in Lightspeed Pascal 1.0 and (after a few months of hard work) it worked OK. But when I got THINK Pascal 2.0 and recompiled it, it bombed on open. After a lot of headaches I noticed a DATA #-16000 resource with size 0 in it, which wasn't in then resource file. I removed it and everything started working again. Recently I noticed that version 2.0 of "DA Shell" sent the DA an empty handle in DCE^.dCtlStorage on Open, where as version 1.0 sent nil. Putting two and two together I thougth that maybe the DATA resource is placed in the dCtlStorage field when the DA is first opened, which would break my: if (DCE^.dCtlStorage=nil) then Initialize else SelectWindow(my DA window); Is this true? Should I check for an empty handle instead of nil? Can I store globals in this resource between executions of the DA? Is this the same in THINK Pascal 3.0? -------------------------------------------------------------------------------- Eggert Thorlacius University of Iceland e-mail: ebth@krafla.rhi.hi Disclaimer: This is a true story, only the variable names have been changed to protect the innocent --------------------------------------------------------------------------------