I lost track of where this started, so apologies in advance if this is 
off base.

If the form can be created w/o a region, you could build a form with 
variables only (this is standard practice for me now), and in an exit 
eep check to see if the form is dirty and "saveRow" if true. In the 
case of a form composed of variables this only serves to suppress 
the system "DoYouWantToSaveThis" screen.

You could then use the values of the form variables and the 
formdirtyflag result to decide if an "actual" update should be issued 
or if the user should be returned to the form (this would happen 
inside a loop in the calling cmd file, not the eep). There is just the  
smallest flicker in returning the user to the screen this way. Of 
course there could/should be a "Stop hitting the escape key" 
message in between. If it would help, I can forward some sample 
code.

Ben Petersen



On 27 Sep 2002, at 10:47, tellef wrote:

> 
> >Try this
> 
> >enter using formname
> >set var lkey = (lastkey(0))
> >if lkey = '[Esc]'  then
> >   do whatever
> >endif
> >return
> 
> Rob:
> 
> I've struggled with the same thing.  I do like what Bernie
> suggests above, where if they don't press a button you send
> them back into the form until they hit one of the two buttons.
> What I do before I bring up the form is:  
>   SET VAR vOK TEXT = NULL
> Then the 'save' button sets vOK to 'yes', the 'cancel' button
> sets vOK to 'no'.  Coming out of the form, I test is vOK is
> still null; if so I send them back into the form.
> 
> But this only half works.  If they press [ESC] and choose to
> SAVE, then you put them back into the form and they press a
> 'cancel' button it is meaningless because they've already 
> saved the data.  I like Sami's idea of coming out of the form 
> and asking them if they meant to save or cancel, but again
> this only half works because they might have already chosen
> to 'save' when they hit the 'esc' and what prevents them now
> from saying they meant to 'cancel'?  You can't undo their save!
> 
> >CASE "[ESC]"
> >   EXITFORM                     -- User wants to quit, so just let
> >   them
> ...
> >                                --
> ****************************************
> >                                -- Rob, in your case, this is where
> >                                -- you'd want to return to the form
> >                                and/or -- whatever else you need it
> >                                to do
> 
> This code from Steve will not work.  If you press an [esc] to leave a
> row, a section, whatever, you CANNOT 'return to the form'.  And that's
> a big problem.  An [esc] is an [esc] to a form; the eep cannot undo an
> escape and return you back into the form.  The eep will continue to
> process (perhaps you could ASK in the eep if they mean to save/discard
> and either do a saverow or a resetrow), but it will still leave the
> form.  
> 
> Karen
> 
> 
> 
> 
> Karen
> 
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In
> the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================ TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
> 


================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to