Any way to "abort" requester.class (string)

4 posts / 0 new
Last post
jabirulo
jabirulo's picture
Offline
Last seen: 3 weeks 14 hours ago
Joined: 2013-05-30 00:53
Any way to "abort" requester.class (string)

Hi, es there any way to abort an already opened requester.class?

  1. dvdobj = (Object *) NewObject(RequesterClass, NULL, // "requester.class",
  2. REQ_Type, REQTYPE_STRING,
  3. REQ_TitleText, CS(MSG_Requester_DVD_Title),
  4. REQ_BodyText, CS(MSG_Requester_DVD_Body),
  5. REQ_GadgetText, CS(MSG_Requester_DVD_Gadget),
  6. REQS_Invisible, FALSE,
  7. REQS_Buffer, buffer,
  8. REQS_ShowDefault, TRUE,
  9. REQS_MaxChars, 255,
  10. TAG_DONE);

it is opened with CreateNewProcTags() and when exit program and if such requester is still opened, how can I "close" it?

  1. if(Req_Process) {
  2. uint32 pid = GetPID(Req_Process, GPID_PROCESS);
  3. DBUG(" [%ld]Req_Process (obj = %p)\n",pid,Req_Process->pr_Task.tc_UserData);
  4. // ToDo: howto "quit" requester.class window ¿:-/
  5. WaitForChildExit(pid);
  6. }
TSK
TSK's picture
Offline
Last seen: 1 year 1 month ago
Joined: 2011-06-28 02:06
Re: Any way to "abort" requester.class (string)

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.

jabirulo
jabirulo's picture
Offline
Last seen: 3 weeks 14 hours ago
Joined: 2013-05-30 00:53
Re: Any way to "abort" requester.class (string)

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

hypex
hypex's picture
Offline
Last seen: 3 months 3 weeks ago
Joined: 2011-09-09 16:20
Re: Any way to "abort" requester.class (string)

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.

Log in or register to post comments