Aaron.Levins@f823.n102.z1.FIDONET.ORG (Aaron Levins) (07/06/89)
Hello everyone!! I've just finished reading "The Complete Guide To Turbo Pascal On The Macintosh" and ran a few of their programs and then I tried one of my own and it worked!! So I thought I had it made- so I made a resource for a window and the menuBar and then I ran my program and I got a menuBar with a window and I couldn't click on the menu Items and my I/O stuff was all over the menuBar!! I tried looking at source codes of programs and programs from the book and the EventHandling procedures were all different!! So I have the following questions..... 1. How do U select the window so that all the I/O routines will go on in it. 2. What's the write coding for handling menus and windows. 3. How do U make it so that in the appleMenu U can have an "About <FileName>..." option in it . 4. And finaly!!-- How do U make and use DLOG resources in Ur program. Well thats it. I know its alot but I'd really appreciate it if U could help me!! Thanks!! Later, A_a_r_o_n___L_e_v_i_n_s -- Aaron Levins via cmhGate - Net 226 fido<=>uucp gateway Col, OH UUCP: ...!osu-cis!n8emr!cmhgate!102!823!Aaron.Levins INET: Aaron.Levins@f823.n102.z1.FIDONET.ORG
tim@hoptoad.uucp (Tim Maroney) (07/07/89)
In article <15145.24B37BC9@cmhgate.FIDONET.ORG> Aaron.Levins@f823.n102.z1.FIDONET.ORG (Aaron Levins) writes: > > Hello everyone!! I've just finished reading "The Complete Guide >To Turbo Pascal On The Macintosh" and ran a few of their programs and then >I tried one of my own and it worked!! So I thought I had it made- so I >made a resource for a window and the menuBar and then I ran my program and >I got a menuBar with a window and I couldn't click on the menu Items and >my I/O stuff was all over the menuBar!! I tried looking at source codes >of programs and programs from the book and the EventHandling procedures >were all different!! So I have the following questions..... >1. How do U select the window so that all the I/O routines will go on in >it. Try doing a "SetPort(window);" before calling the I/O routines. however, you should be aware that writeln and so forth are not very useful for real Mac programming, no matter how useful they may be foir the first month or so of learning the Mac. >2. What's the write coding for handling menus and windows. There's lots. I suggest reading the "Using the Window Manager" and "Using the Menu Manager" sections in Inside Mac, volume I. >3. How do U make it so that in the appleMenu U can have an "About ><FileName>..." option in it . Generaly, you declare a menu resource that has this item and a disabled item below it consisting of a hyphen. Then you call "AddResMenu(menu, 'DRVR');" on the menu handle you get from GetMenu. >4. And finaly!!-- How do U make and use DLOG resources in Ur program. The best way to make them is with the Resource Editor (ResEdit). The second best way is with one of the resource compilers. You use them by calling the Dialog Manager described in Inside Mac volume I. If your book doesn't cover dialogs, then it's a pretty inadequate book. Even if it's the best book in the world, though, you still need to get Inside Macintosh to do real Mac programming, and eventually you'll need to get the Technical Notes as well. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com Postal: 424 Tehama, SF CA 94103; Phone: (415) 495-2934 Feminism that refuses to use the word "patriarchy" is kin to abolitionism that refuses to use the word "slavery".