home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!quadra.chem.utah.edu!dmitry
- From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
- Subject: I hate THINK Pascal...
- Message-ID: <1993Jan24.005729.13045@fcom.cc.utah.edu>
- X-Xxmessage-Id: <A5A4B32EBF01C4C9@quadra.chem.utah.edu>
- X-Xxdate: Thu, 23 Jan 92 15:00:14 GMT
- Sender: news@fcom.cc.utah.edu
- Organization: University of Utah
- X-Useragent: Nuntius v1.1.1d17
- Date: Sun, 24 Jan 93 00:57:29 GMT
- Lines: 63
-
- Hello,
- I really hate THINK Pascal now!! :( Because, whatever I do,
- all couse problems..
- I'm working on Molecular Designer package and would like to write Floating
- palettes. Problem with Events, partcicularly with App4Evt, made me CRAZY!!
- If you have enought time, please take a look on this fragment of my code:
-
- procedure DoEvent (theEvent: EventRecord);
- begin
- case theEvent.what of
- mouseDown:
- DoMouseDown(theEvent);
- activateEvt:
- if BITAND(theEvent.modifiers, activeFlag) <> 0 then
- DoActivate(theEvent)
- else
- DoDeactivate(theEvent);
- updateEvt:
- DoUpDate(theEvent);
- app4Evt:
- (****) case BITAND(theEvent.message, TypeMask) of
- suspendResumeEvt:
- if BITAND(theEvent.message, SuspendResumeBit) <> 0 then
- DoResume(theEvent)
- else
- DoSuspend(theEvent);
- end;
- end;
- end;
- procedure EventLoop;
- var
- theEvent: EventRecord;
- begin
- while running do
- begin
- if WNEImplemented then
- begin
- if WaitNextEvent(everyEvent, theEvent, 0, nil) then
- DoEvent(theEvent);
- end
- else
- begin
- if GetNextEvent(everyEvent, theEvent) then
- DoEvent(theEvent);
- SystemTask;
- end;
- end;
- end;
-
- ++++++++++++++++
- I set up "Break point" to (****) and I figured out that it NEVER EVER
- comes to this point!!! -In other words, EVENT.
- I thought, what can be wrong here!? Code seems absoulutely right!
- Even, it works in THINK C!
- Please, if anyone know what's the problem, HELP!
-
- THANKS! :)
- o=======================================o
- I Dmitry Boldyrev. I
- I Department of Chemistry, I
- I University of Utah SLC Utah. I
- I Inter. dmitry@chemistry.chem.utah.edu I
- o=======================================o
-