home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sequent!ogicse!usenet.coe.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!cs.utexas.edu!rutgers!cbmvax!peter
- From: peter@cbmvax.commodore.com (Peter Cherna)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: ASL and GadTools libraries.
- Message-ID: <33732@cbmvax.commodore.com>
- Date: 28 Jul 92 16:05:54 GMT
- Article-I.D.: cbmvax.33732
- References: <1992Jul27.191144.25772@wam.umd.edu>
- Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
- Organization: Commodore-Amiga, Inc. West Chester, PA.
- Lines: 45
-
- In article <1992Jul27.191144.25772@wam.umd.edu> stark@wam.umd.edu (Mike Stark) writes:
- >When using the hook function to get messages from a shared IDCMP while an ASL
- >requester is displayed, it works to return a NULL pointer instead of the
- >pointer to the message ASL passed you. (The reason you would want to do this
- >is if you want to close the window with which the message is associated while
- >the ASL requester is displayed.) The reason it is OK is that ASL calls
- >GT_ReplyIMsg which doesn't mind being passed a NULL pointer.
-
- Those are mighty strong assumptions you're making. How do you know that
- _all_ ASL does is GT_ReplyMsg()? Suppose that in the future it has to
- do something else with it.
-
- >The autdocs take a strong stance against doing this but it works.
-
- Programming by that kind of credo is asking for trouble. I cannot overemphasize
- the importance of heeding the documented warnings.
-
- >I wish the autodocs said this was OK because I really want to let the user
- > of my program close windows while the ASL requester is active.
-
- The autodocs WON'T say it's OK because it's NOT. If you want to close
- the window while the requester is active, then don't pass your window
- in as a reference window. It's pretty simple.
-
- >GetMsg/GT_FilterIMsg/GT_PostFilterIMsg/ReplyMsg does not operate the same
- >as GT_GetIMsg/GT_ReplyIMsg. In particular, if you are using the GT_Filter
- >routines, you start losing IDCMP_MOUSEMOVE events when you are using the
- >slider gadgets from GadTools. I imagine that GadTools turns them off so as
- >not to get too far behind and GT_PostFilterIMsg doesn't turn them back on
- >again while GT_ReplyIMsg does. Go figure.
-
- Your diagnosis is wrong. GadTools never modifies IDCMP flags. What
- you are doing wrong is failing to ReplyMsg() all the messages you get
- from GetMsg(). You probably only call ReplyMsg() when GT_FilterIMsg()
- returns non-NULL. If you're using the filter functions, you must
- ReplyMsg() EVERYTHING you GetMsg(). That's your mistake.
-
- >---Mike Stark | stark@umdhep.umd.edu
-
- Peter
- --
- Peter Cherna, Operating Systems Development Group, Commodore-Amiga, Inc.
- {uunet|rutgers}!cbmvax!peter peter@cbmvax.commodore.com
- My opinions do not necessarily represent the opinions of my employer.
- "If we only use 15% of our brain, what do you suppose the other 75% is for?"
-