blmara wrote:Hi,
in my program I modify some IDCMP flags in response to certain events. For example, after getting a WMHI_GADGETUP I stop receiving intuiticks with
Code: Select all
...
IIntuition->ModifyIDCMP(dobj->win,dobj->win->IDCMPFlags & (~IDCMP_INTUITICKS));
...
IMHO you must not call ModifyIDCMP on a window which was created by window.class. The window is property of the class and you must not change it without telling the class.
You might try to SetAttrs(dobj->winobj,GA_IDCMP,dobj->win->IDCMPFlags & (~IDCMP_INTUITICKS),TAG_DONE); but this probably won't clear INTUITICKS because the class needs IntuiTicks for the GadgetHelp timing.
I have used WINDOW_GadgetHelp to get my window object show gadget help hints and each gadget has a GA_HintInfo string. They are shown fine until WMHI_GADGETUP handling, after which no hints are shown anymore. Could this be because of removing intuiticks?
Yes, sure.
I managed to restore gadget hints by
Code: Select all
...
IIntuition->SetAttrs(dobj->winobj,WINDOW_GadgetHelp,TRUE,TAG_DONE);
...
but this seems to have side effects with IDCMP messages.
Sure. Window.class will set all IDCMP flags it needs. As it needs IntuiTicks for GadgetHelp, IntuiTicks will be enabled if you set GadgetHelp.
So, how could I use both approaches (gadget hints and to be able to modify IDCMP messages received by my proghram) at the same time?
You can't. Set a flag in your program that you don't want IntuiTicks and when it is set, ignore the IntuiTicks you receive.