Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!elroy!brad From: brad@gobi.jpl.nasa.gov (Brad Pickering) Newsgroups: comp.sys.mac.hypercard Subject: HC 2.0, XCMDs, THINK C, globals Message-ID: Date: 19 Apr 91 22:25:57 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Distribution: comp Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 18 Nntp-Posting-Host: ais-gw.jpl.nasa.gov I have some questions about how HC 2 handles XCMDs. I would like to write XCMDs that remember their globals between calls. I tried this with a simple XFCN that just added 1 to a global and returned the value as the result. Each time it was called it came back with the next higher number. But I tried to do this with a more complex XCMD and I've be having lots of problems. Does HyperCard jump to the beginning of the real resource or does it make a copy and jump to the beginning of the copy? If it is using the real resource does it honor the purgable and locked attributes of the resource? I tried marking the resource as locked and it seemed to crash HyperCard. If I use global variables which are pointers to code or data within the XCMD don't want HyperCard to move my resource around makeing the pointers invalid. Any information about such problems would be appreciated. -- -- Brad Pickering brad@gobi.jpl.nasa.gov --