ebth@rhi.hi.is (Eggert Bjarni Thorlacius) (11/30/90)
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
--------------------------------------------------------------------------------