Hi, just tried to use TimedDosRequesterTags() and change its 'EasyStruct' using TDR_EasyStruct, as I want the requeter to opne centered on a ReAction GUI window I'm developing.
Seems I'm (as usual) missing something, 'cos it always pops up centered on screen.
Are the TagItem I set ok?
BTW pwindow is a 'struct Window' defined globally on source.
uint32 DoMessage(char *message, char reqtype, STRPTR buttons) { int32 nDummy; struct TagItem es_ti[] = { {ESA_Position, REQPOS_CENTERWINDOW}, {TAG_DONE, 0} }; struct EasyStruct es;// = {sizeof(struct EasyStruct), // ESF_TAGGED, // "DefMousePointers", NULL, NULL, // NULL, es_ti // }; es.es_StructSize = sizeof(struct EasyStruct); es.es_Flags = ESF_TAGGED; es.es_Title = "DefMousePointers"; es.es_TagList = es_ti; nDummy = IDOS->TimedDosRequesterTags(//TDR_TitleString, "DefMousePointers", TDR_GadgetString, buttons? buttons : GetString(&li,MSG_OK_GAD), TDR_FormatString, message, TDR_ImageType, TDRIMAGE_ERROR, TDR_Window, pwindow, TDR_EasyStruct, &es, TAG_DONE); return nDummy; }
You should report this as a bug.
For easy direct comparison I created this little test case:
It works with EasyRequest but not with TimedDosRequester. The latter is always centered on the screen, not on the window.
First off any unused fields of the EasyStruct structure should be set to zero rather than left undefined. This can be done with "ClearMem(&es, sizeof(es));" before any other initialisation is done.
Also try setting TDR_NonBlocking to TRUE in your TimedDosRequesterTags() call. If it works better this way then it's simply a missing feature in the IPrefs patched version of this function.
Just for testing sake, WPOS_CENTERWINDOW AND WPOS_CENTERSCREEN were reversed in a much older SDK. Try using REQPOS_CENTERSCREEN to see if they are reversed, too.
ok, adding ClearMem() and TDR_NonBlocking then shows requester centered on window (with REQPOS_CENTERWINDOW), but without all the eyecandy (no TDR_ImageType,TDRIMAGE_ERROR is used and buttons look '_Cancel' & 'C_ontinue' not underscored).
So it's iPrefs bug then?
TIA
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
@jabirulo
No, just a missing feature as I said before.
IPrefs patches TimedDosRequester() to use the ReAction "requester.class" when possible. The "requester.class" however from what I can see places the requester according to GUI/screen settings and allows no way of overriding this for a specific requester only.
Ok, I got the impression that 'missing feature' meant it should work but coders forgot to add code to iprefs.
Shame, 'cos was a nice option could be nice on some cases.
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P