[comp.sys.mac.programmer] Once again, guess what I need...

jpf10694@uxa.cso.uiuc.edu (Joseph Peter Fleck) (02/15/91)

Well,
     I've been programming on Think's C for about a year now and have been
working on my game since then.  I've had some problems with it (what an
understatement!) Here goes:

1:If "USE THE DEBUGGER" is not checked, and I exit out of my program back to 
the compiler, I get about 5 beeps and then it exits (which really makes me tend
to use the debugger as this gets very annoying very quickly)  Any ideas?  I've
tried flushing the events right before exit, but no help there.

2 : If my program is run from the finder, and windows are open, the open windows
on the desktop take precedence over my game which is also equally annoying.
Yes, I've made sure that the -1L is in the getCWindow line.  I'm stumped there,
too.  Any help will be greatly appreciated.  If you could e-mail me an answer
that would be great, but a reply here is Ok too. 
     Thanks!
        -Joe
        jpf10694@uxa.cso.uiuc.edu

aries@rhi.hi.is (Mimir Reynisson) (02/16/91)

Hi,

   I'm sorry I can't help you with your first question, since I tend
to stick to my MPW a lot more than the THINK compilers (though I have
them both, I don't think I have ever used THINK C ... humm, makes one
wonder don't it :-))

   Anyway regarding your second question. It seems to me that you're
running your application in multifinder, right?! Well if you're, and
your windows come up behind the finder's windows and then move to the
front after a little while. The problem is that you havn't pulled your
application to the front. You should call IsEventAvail maybe 3 or 4
times before entering your main event loop, but after your have flushed
all the events. This will give multifinder enough time to pull you to
the front.

Hope this helps.

--MymR