In about every program I made, that uses ReAction, I use this WA_IDCMP construction:
- WA_IDCMP, 0
- | IDCMP_CLOSEWINDOW
- | IDCMP_NEWPREFS
- | IDCMP_EXTENDEDMOUSE
- | IDCMP_GADGETUP
Nowhere am I (aware of) listening for IntuiTick-events nor MouseMove-events, yet I am bombarded with messages related to those events! They just take up precious CPU-cycles without much ado.
How can I suppress these messages from arriving on my port, i.e. cluttering the wait()-loop?
On a side note: what is IDCMP_NEWPREFS indicating? It is just there because I once thought it would notify me of some changes to the preferences, so I could close and reopen the window(s). Not so, or I missed something.
With ReAction you don't have control of IDCMP flags. You can only add to those that window.class already uses for its own purposes. For example you don't need to set CLOSEWINDOW or GADGETUP, they are always set.
Regarding specific IDCMP flags, the intuition.library/ModifyIDCMP autodocs should have a detailed description of each flag.
The IDCMP_NEWPREFS relates to the old Prefs program settings. It's use is restritcted which would explain why things don't show up. But I don't know why they didn't extend it's usage and they don't explain how to get events from the new prefs mechanism.
Thank you for your clear answer.
That was my guess already, about IDCMP_NEWPREFS being obsolete. And the method of installing notifications on a number of prefs settings seems to me a bit counter productive.
Would it be much of a hassle to have IPrefs broadcast changes in preferences, I wonder?
I agree, with having IPrefs broadcast changes in preferences, but I don't know how much of a hassle it would be. The docs don't say much about IDCMP_NEWPREFS nor if it has any detail on what changed. In any case I don't see why they can't be extended with extra fields set in the message. It seems a bit vague to expect the programmer to lock onto a prefs file and which one? As there is ENV: and ENVARC:. This is the job of Intuition, not DOS, but I only see this as forcing the programmer to manually use DOS for what should be built into Intuition and what used to be. :-?