bowman@phoenix.Princeton.EDU (Hiroshi Bowman) (05/07/90)
Hiya-- Congratulate me: I've just written the world's first modal DA... Umn, now how do I do it *right*?? (I live in abject fear of the Macintosh thought police, you understand.) I'm working with Think Pascal version 4.0, and I'm trying to write a simple DA according to their skeleton example. I've got a case statement that calls separate procedures depending upon the value I'm fed via 'sel' (Think's glue routine passes an integer in this argument to the DA: 'sel' can hold the values 0..4, and it reflects which entry point of their glue routine received the call). So far so good, 'cept that my Control procedure never gets called. When my DA is invoked, Open is called just fine, and I return NoErr for Main just like I'm supposed to. But then I lose control forever and ever amen... My kludge for the moment is to put my own event loop into Open and relenquish control only when I get a mouseDown event in the go-away box. Voila! Modal DA. Please help...please?! --HCB