home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!destroyer!sol.ctr.columbia.edu!ira.uka.de!chx400!ugun2b!ugsc2a!jordi
- Newsgroups: comp.sys.mac.programmer
- Subject: AEInteractWithUser help needed !!!
- Message-ID: <1992Jul27.110315.935@sc2a.unige.ch>
- From: jordi@sc2a.unige.ch
- Date: 27 Jul 92 11:03:15 +0200
- Organization: University of Geneva, Switzerland
- Lines: 58
-
- Hello netters,
-
- I have a beginner's problem using the AEInteractWithUser function (in C)...
-
- As I would like to bring a dialog window to the front of the screen,
- wherever my process is running in background or in foreground, I use the
- following code:
-
- Error = AESetInteractionAllowed( kAEInteractWithAll ) ;
- ...
- Error = AEInteractWithUser( kAEDefaultTimeout, NIL_POINTER, HandleEvent ) ;
- if ( Error == noErr )
- {
- ...
- code for dialog window display
- ...
- }
- Play_Beep() ;
-
-
- (Error is of type OSErr.)
-
- The AEInteractWithUser function returns 'noErr' and the code block included
- between the {} "must" be executed. My 'Play_Beep' procedure is executed.
-
- The problem is that the whole process (the dialog window) does not come to
- the foreground when expected (what AEInteractWithUser is supposed to do:
- bringing it to the front, interact, and goind back again).
-
- It comes to the foreground only if I click on one of its windows, THEN it
- executes the code included between the { }. It sounds like the code is queued
- somewhere, skiped, and only executed when the process comes to the front...
-
- I think I have to enable the kAEAlwaysInteract flag in order to let AESend
- use it. But how is it possible to set this flag as an option for
- AEInteractWithUser ? (Page 6-52 of Inside Mac Volume VI)
- AESend is used by AEInteractWithUser.
- What is exactly the problem ? (I use Think C 5.0.2)
-
- Does anybody here have a short and easy to use example routine to show me
- how to deal with such AE functions ?
-
- I thank you for your help !!!
-
- Sincerely,
-
- Steve Jordi
-
- +-----------------------------+-----------------------------------+
- | Steve JORDI | Fax : + 41 22 320-5732 |
- | Dpt of Geophysics | |
- | University of Geneva | Internet : jordi@sc2a.unige.ch |
- | 13, Rue des Maraichers | Bitnet : jordi@cgeuge52 |
- | 1211 Geneva 4 | Compuserve : 70143,3056 |
- | Switzerland | (once a week) |
- +-----------------------------+-----------------------------------+
- | D o n ' t W o r r y , B e A p p l e ! ! ! |
- +-----------------------------------------------------------------+
-