Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Scratch8, Scratch20 lmg's Message-ID: <10866@hoptoad.uucp> Date: 20 Mar 90 10:34:27 GMT References: <14420@reed.UUCP> <10848@hoptoad.uucp> <14443@reed.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 25 In article <10848@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >>The recommended solution for most Scratch-using software is to use >>code space and PC-relative reads and writes for global data that can't >>be reached with a globals register. In article <14443@reed.UUCP> bowman@reed.UUCP (Eric Bowman) writes: >Could someone perhaps elaborate on an appropriate technique for sharing >data between an application and an LDEF? The only way I could figure out >how to do this without a serious performance sacrifice was with Scratch stuff. Try using the refCon and userHandle fields of the list record. There's no significant performance difference (a couple of extra derefs) between this and using the Scratch variables. Incidentally, has anyone come up with a canonical way to share information between the caller of Standard File and its filter routines, without using globals? The problem is that the caller doesn't have access to the dialog window or any of its controls, which haven't been created yet at the time of call, so it can't stash a pointer to information in a refCon. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "There are no Famous People on the net. Only some of us with bigger mouths than others." -- Dan'l Danehy-Oakes, The Roach