Loading ...
Sorry, an error occurred while loading the content.

Re: Batch Task - prevent user aborting process

Expand Messages
  • ivanagugu
    Change mouse pointer to hourglass to prevent closing app before starting batch, and return to arrow after that... ... but the ... different ... mapped to ...
    Message 1 of 17 , Dec 1, 2007
    • 0 Attachment
      Change mouse pointer to hourglass to prevent closing app before
      starting batch, and return to arrow after that...

      --- In magicu-l@yahoogroups.com, "Andy Jerison" <ajerison@...> wrote:
      >
      > Hi Jeff,
      >
      > Main program events with scope = Subtree are active throughout your
      > application, so the answer is yes, this technique works within any batch
      > process in the application. Keith was responding to another question
      but the
      > same approach will work in your case; you just need to handle a
      different
      > event.
      >
      > When the user hits <Esc>, the engine goes through a process like the
      > following. I've left out some alternate paths for simplicity.
      >
      > 1. Look in the current keyboard mapping file to find the action
      mapped to
      > <Esc>, which is Exit.
      > 2. Beginning with the current task, search the task tree for a
      handler for
      > the Exit action.
      > 3. When a handler is found, check whether it is enabled. If so,
      execute its
      > operations, then check whether its Propagate property is Yes or
      True. If it
      > is, resume looking for a handler. If not, stop here.
      >
      > Here are a couple of the complicating factors:
      >
      > First, the engine has to know in what order to look for handlers. It
      starts
      > at the bottom of the current task's logic and works up through that.
      Then it
      > looks in the parent task following the same order, and so on till it
      reaches
      > the Main Program.
      >
      > Also, the engine has to check for other events that may have become
      true as
      > a result of the <Esc> keypress. For example, KbGet(1)='Exit'ACT
      becomes true
      > at that moment so the engine also has to look for any handlers for
      > expressions containing KbGet().
      >
      > See message #95870
      > (http://tech.groups.yahoo.com/group/magicu-l/message/95870) for an
      > explanation of a global method for handling <Esc> in batch tasks. I
      use the
      > technique I describe to allow users to interrupt long reports but
      only after
      > they read a dialog. Rereading my post reminds me that I didn't really
      > describe it very well, let me know if you need a clearer version.
      >
      > Andy
      >
      > -----Original Message-----
      > From: magicu-l@yahoogroups.com [mailto:magicu-l@yahoogroups.com] On
      Behalf
      > Of Jeff Jirikowic
      > Sent: Friday, November 30, 2007 10:03 AM
      > To: magicu-l@yahoogroups.com
      > Subject: [magicu-l] Re: Batch Task - prevent user aborting process
      >
      > Hi Keith,
      > Will that work in the middle of a batch process? Because I don't
      > know when the user would hit esc, I therefore do not know what
      > subtask the process may be in. Once this batch task starts, I want
      > to prevent any interuptions that would cause the process to stop
      > before it finishes completely.
      >
      > Thanks,
      > Jeff.
      >
      > --- In magicu-l@yahoogroups.com, "Keith Canniff" <kcanniff@> wrote:
      > >
      > > Jeff,
      > >
      > >
      > >
      > > Actually it's pretty easy:
      > >
      > >
      > >
      > > Main Program: Create a Handler with the internal event "Exit
      > System". We add
      > > a Verify Warning message in the handler telling the user to press
      > our Exit
      > > system button on our main menu.
      > >
      > > The handler above has an "Enable" Expression that a global virtual
      > of
      > > "NOT(Allow system exit). When the user presses our main menu exit
      > button,
      > > it's handler sets the "Allow system exit" vitual to true, then
      > raises an
      > > "Exit System" event. Now the global handler doesn't capture the
      > attempted
      > > system exit and lets them leave.
      > >
      > >
      > >
      > > HTH
      > >
      > >
      > >
      > > Keith
      > >
      > >
      > >
      > > From: magicu-l@yahoogroups.com [mailto:magicu-l@yahoogroups.com] On
      > Behalf
      > > Of Steven G. Blank
      > > Sent: Thursday, November 29, 2007 4:46 PM
      > > To: magicu-l@yahoogroups.com
      > > Subject: Re: [magicu-l] Batch Task - prevent user aborting process
      > >
      > >
      > >
      > > Jeff,
      > >
      > > If you have the MIUG 2006 Conference CDs, there's a program called
      > > "Prevent Interruptions" in my demo application that illustrates how
      > > to do this using event handlers.
      > >
      > > If you don't have the conference CDs, I'd be happy to send a copy
      > of
      > > that program to you - assuming you don't mind waiting until I get
      > > back home again on December 10th, that is.
      > >
      > > Steve Blank
      > >
      > > At 03:47 PM 11/29/2007, you wrote:
      > > >Hi,
      > > >I remember seeing a thread on this at some point, but after
      > searching, I
      > > >wasn't able to find it.
      > > >
      > > >What is the easiest way to prevent a user from aborting a batch
      > process
      > > >once it is started? Not really sure how they are aborting, but
      > maybe
      > > >just the 'esc' key.
      > > >
      > > >Oh, version 9.4.
      > > >
      > > >Thanks for the help,
      > > >Jeff.
      >
    • Andy Jerison
      Hi Ivan, Changing the appearance of the mouse pointer doesn t actually change its functionality. It is good practice, though, to change it to the hourglass (or
      Message 2 of 17 , Dec 1, 2007
      • 0 Attachment
        Hi Ivan,

        Changing the appearance of the mouse pointer doesn't actually change its
        functionality. It is good practice, though, to change it to the hourglass
        (or in Vista, to the rotating doughnut) so the user won't expect it to do
        anything.

        Andy

        -----Original Message-----
        From: magicu-l@yahoogroups.com [mailto:magicu-l@yahoogroups.com] On Behalf
        Of ivanagugu
        Sent: Saturday, December 01, 2007 4:57 AM
        To: magicu-l@yahoogroups.com
        Subject: [magicu-l] Re: Batch Task - prevent user aborting process

        Change mouse pointer to hourglass to prevent closing app before
        starting batch, and return to arrow after that...

        --- In magicu-l@yahoogroups.com, "Andy Jerison" <ajerison@...> wrote:
        >
        > Hi Jeff,
        >
        > Main program events with scope = Subtree are active throughout your
        > application, so the answer is yes, this technique works within any batch
        > process in the application. Keith was responding to another question
        but the
        > same approach will work in your case; you just need to handle a
        different
        > event.
        >
        > When the user hits <Esc>, the engine goes through a process like the
        > following. I've left out some alternate paths for simplicity.
        >
        > 1. Look in the current keyboard mapping file to find the action
        mapped to
        > <Esc>, which is Exit.
        > 2. Beginning with the current task, search the task tree for a
        handler for
        > the Exit action.
        > 3. When a handler is found, check whether it is enabled. If so,
        execute its
        > operations, then check whether its Propagate property is Yes or
        True. If it
        > is, resume looking for a handler. If not, stop here.
        >
        > Here are a couple of the complicating factors:
        >
        > First, the engine has to know in what order to look for handlers. It
        starts
        > at the bottom of the current task's logic and works up through that.
        Then it
        > looks in the parent task following the same order, and so on till it
        reaches
        > the Main Program.
        >
        > Also, the engine has to check for other events that may have become
        true as
        > a result of the <Esc> keypress. For example, KbGet(1)='Exit'ACT
        becomes true
        > at that moment so the engine also has to look for any handlers for
        > expressions containing KbGet().
        >
        > See message #95870
        > (http://tech.groups.yahoo.com/group/magicu-l/message/95870) for an
        > explanation of a global method for handling <Esc> in batch tasks. I
        use the
        > technique I describe to allow users to interrupt long reports but
        only after
        > they read a dialog. Rereading my post reminds me that I didn't really
        > describe it very well, let me know if you need a clearer version.
        >
        > Andy
        >
        > -----Original Message-----
        > From: magicu-l@yahoogroups.com [mailto:magicu-l@yahoogroups.com] On
        Behalf
        > Of Jeff Jirikowic
        > Sent: Friday, November 30, 2007 10:03 AM
        > To: magicu-l@yahoogroups.com
        > Subject: [magicu-l] Re: Batch Task - prevent user aborting process
        >
        > Hi Keith,
        > Will that work in the middle of a batch process? Because I don't
        > know when the user would hit esc, I therefore do not know what
        > subtask the process may be in. Once this batch task starts, I want
        > to prevent any interuptions that would cause the process to stop
        > before it finishes completely.
        >
        > Thanks,
        > Jeff.
        >
        > --- In magicu-l@yahoogroups.com, "Keith Canniff" <kcanniff@> wrote:
        > >
        > > Jeff,
        > >
        > >
        > >
        > > Actually it's pretty easy:
        > >
        > >
        > >
        > > Main Program: Create a Handler with the internal event "Exit
        > System". We add
        > > a Verify Warning message in the handler telling the user to press
        > our Exit
        > > system button on our main menu.
        > >
        > > The handler above has an "Enable" Expression that a global virtual
        > of
        > > "NOT(Allow system exit). When the user presses our main menu exit
        > button,
        > > it's handler sets the "Allow system exit" vitual to true, then
        > raises an
        > > "Exit System" event. Now the global handler doesn't capture the
        > attempted
        > > system exit and lets them leave.
        > >
        > >
        > >
        > > HTH
        > >
        > >
        > >
        > > Keith
        > >
        > >
        > >
        > > From: magicu-l@yahoogroups.com [mailto:magicu-l@yahoogroups.com] On
        > Behalf
        > > Of Steven G. Blank
        > > Sent: Thursday, November 29, 2007 4:46 PM
        > > To: magicu-l@yahoogroups.com
        > > Subject: Re: [magicu-l] Batch Task - prevent user aborting process
        > >
        > >
        > >
        > > Jeff,
        > >
        > > If you have the MIUG 2006 Conference CDs, there's a program called
        > > "Prevent Interruptions" in my demo application that illustrates how
        > > to do this using event handlers.
        > >
        > > If you don't have the conference CDs, I'd be happy to send a copy
        > of
        > > that program to you - assuming you don't mind waiting until I get
        > > back home again on December 10th, that is.
        > >
        > > Steve Blank
        > >
        > > At 03:47 PM 11/29/2007, you wrote:
        > > >Hi,
        > > >I remember seeing a thread on this at some point, but after
        > searching, I
        > > >wasn't able to find it.
        > > >
        > > >What is the easiest way to prevent a user from aborting a batch
        > process
        > > >once it is started? Not really sure how they are aborting, but
        > maybe
        > > >just the 'esc' key.
        > > >
        > > >Oh, version 9.4.
        > > >
        > > >Thanks for the help,
        > > >Jeff.
      Your message has been successfully submitted and would be delivered to recipients shortly.