Hi, es there any way to abort an already opened requester.class?
dvdobj = (Object *) NewObject(RequesterClass, NULL, // "requester.class", REQ_Type, REQTYPE_STRING, REQ_TitleText, CS(MSG_Requester_DVD_Title), REQ_BodyText, CS(MSG_Requester_DVD_Body), REQ_GadgetText, CS(MSG_Requester_DVD_Gadget), REQS_Invisible, FALSE, REQS_Buffer, buffer, REQS_ShowDefault, TRUE, REQS_MaxChars, 255, TAG_DONE);
it is opened with CreateNewProcTags() and when exit program and if such requester is still opened, how can I "close" it?
if(Req_Process) { uint32 pid = GetPID(Req_Process, GPID_PROCESS); DBUG(" [%ld]Req_Process (obj = %p)\n",pid,Req_Process->pr_Task.tc_UserData); // ToDo: howto "quit" requester.class window ¿:-/ WaitForChildExit(pid); }
You can always dispose any object created with NewObject(). But if the requester is opened already then I think program execution is stopped until the user clicks a button. You can't force it to close. You'll have to wait for the user always. AmigaOS doesn't have means to kill any process by force.
A better way would be to not use Requester class at all but using a normal window and Wait() for any user input. That way you can close your window and tell the sub process to exit.
You have to tell your child/sub process that it's time to quit using a signal or something, making the sub process to wait for the signal.
THX I'm afraid such (window.class) option is the most save (as for now).
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
It doesn't use a class but depending on your needs you could use BuildEasyRequest(). This allows more control than simply leaving it up to the system. You can open it up and close it down any time you want.