Path: utzoo!attcan!uunet!mcvax!ukc!etive!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: How to make an FKEY? Keywords: FKEY Message-ID: <987@etive.ed.ac.uk> Date: 21 Nov 88 14:54:11 GMT Sender: news@etive.ed.ac.uk Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 26 How do I make an FKEY? I just picked up the FKEY manager (sorry, can't remember the author!), and I may have a go at rolling my own... My LSC manual says that an FKEY is just a parameterless function, so I presumably write pascal main() { RememberA0(); SetUpA4(); /* Access my globals... */ ... RestoreA4(); } and then build a code resource of type 'FKEY', and that's it. But: (i) What does an FKEY return? Is the value important? (ii) does it really matter how much I do in the FKEY? It doesn't want to be anything too time-consuming, I suppose, but it can presumably call up dialogues and so on (if it assumes the managers are initialised...) Nick. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcvax!ukc!lfcs!nick ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ...while the builders of the cages sleep with bullets, bars and stone, they do not see your road to freedom that you build with flesh and bone.