3XMQGAA@CMUVM.BITNET (Sari Khoury) (12/27/90)
I am learning C right now with THINK C 4.0 and have run into some problems. After completing some applications from the Macintosh Programming Primer (book ), I decided to try and make my own simple program. I just wanted it to display menus, the apple and file, I didn't want it to do anything, just display menus . So I did the defines, and had it initalize the ToolBox/MenuBar/Menus, but I c ouldn't make any progress without having to add "HandleAppleChoice" and "Handle FileChoice" and telling what should happend when I go to the file or apple menu . And I also had to add all this HandleEvents junk. Why do I have to have event s when all I went is menus? I am confused and frustrated. It will compile fine but then give me a system error when it runs. if someone can help me, I could s end them the source code that I typed up. Thank You very much. ------------------------------------------------------------------------- Sari Khoury BITNET : 3XMQGAA@CMUVM Art Department Internet: skhoury@postcard.engin.umich.edu Central Michigan University UUCP : "psuvax1"!cmuvm.bitnet!3xmqgaa Mt. Pleasant, MI 48859 USA
Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) (12/29/90)
Sari Khoury writes in a message to All
SK> I c ouldn't make any progress without having to add "HandleAppleChoice"
SK> and "Handle FileChoice" and telling what should happend when
SK> I go to the file or apple menu . And I also had to add all this
SK> HandleEvents junk. Why do I have to have event s when all I went
SK> is menus? I am confused and frustrated. It will compile fine
SK> but then give me a system error when it runs. if someone can
SK> help me, I could s end them the source code that I typed up.
SK> Thank You very much.
----------------------------------------------------------
SK> ---------------
I don't think that you understand Mac Programming yet:
SK> I just wanted it to display menus, the apple and file, I didn't
SK> want it to do anything, just display menus . So I did the defines,
SK> and had it initalize the ToolBox/MenuBar/Menus, but I
If you have something that keeps track of events, then it has to have
something
happen when events are recognized. Do you speak Pascal? If not, then you had
beeter learn, as the Mac is a Pascal=oriented machine. If so, then get a copy
of "Macintosh Revealed," vol 1 and 2, and read through those. Also, as you
have
Think C 4.0, you can run the samples code and step through with the debugger
and watch just what happens in the event loop in the SwitchBoard object.
Read thge books first, though.
Lawson (the Mac ain't easy: most people take 5-6 months before something
really
"clicks" and they understand this stuff)
--
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English
Internet: Lawson.English@p88.f15.n300.z1.fidonet.org