For Programmers: Free Programming Magazines  


Home > Archive > Clipper > October 2005 > Memo change update -notify user









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Memo change update -notify user
PATRICIA HILL

2005-10-11, 6:55 pm

I would like to notify the user that the memo field has been altered (if it
has been) when the user selects "Return" ( instead of Update Record ).

I have tried to trap editing keys but they are also used for navigation and
I can't seen to get access to the altered memo from the UDF.

Any suggestions?

Thanks,
PeterH


Stephen Quinn

2005-10-12, 7:55 am

Peter

>I would like to notify the user that the memo field has been altered (if it
> has been) when the user selects "Return" ( instead of Update Record ).

Not knowing what you mean by
- selects "Return" ( instead of Update Record )
as I don't have your apps screen in front of me - I'll guess<g>

Save the contents and compare afterwards.
Eg
cText := x->MEMOFLD
cOldText := cText
// Edit the record
IF cText != cOldText
// Tell the user somethings changed
// Why wouldn't the user know it's changed if they just edited it??
ENDIF

HTH
Steve


PeterH

2005-10-12, 7:55 am

Steve, sorry for the confusion regarding "Return". From within the user
function I give the uses three choices:
Continue - Ignore and continue
Update - Update the editing buffer and set flag to update dbf on exit of
memoedit
Return - Don't update, ignore changes and return to calling program

In the user function I do not have access to the "modified" memo string, so
I don't know how to compare to the original.

I guess I could change the Continue,Update,Return to after exit of the
memoedit but if the user wants to continue I would have to re-enter the
memoedit with the cNewText in place of cOrigText. I was hoping to determine
the status of *changed* from within the UDF.

Thanks for the suggestion. Any more ideas?
PeterH



"Stephen Quinn" <steveq@NOSPAMintegritynet.com.au> wrote in message
news:1C43f.15838$U51.13291@news-server.bigpond.net.au...
> Peter
>
it[color=darkred]
> Not knowing what you mean by
> - selects "Return" ( instead of Update Record )
> as I don't have your apps screen in front of me - I'll guess<g>
>
> Save the contents and compare afterwards.
> Eg
> cText := x->MEMOFLD
> cOldText := cText
> // Edit the record
> IF cText != cOldText
> // Tell the user somethings changed
> // Why wouldn't the user know it's changed if they just edited

it??
> ENDIF
>
> HTH
> Steve
>
>



Ian Boys

2005-10-12, 6:55 pm

In the UDF look at LASTKEY() each time and if it's > 31 or an editing key
such as 7 (Del) or 8 (backspace) then set a flag to say that it has been
edited.

Personally I do the whole thing in a DO WHILE loop and actually compare the
two strings each time the user exits.

Ian Boys
DTE


"PeterH" <petermhill@verizon.net> wrote in message
news:N%63f.18117$at1.2920@trnddc05...
> Steve, sorry for the confusion regarding "Return". From within the user
> function I give the uses three choices:
> Continue - Ignore and continue
> Update - Update the editing buffer and set flag to update dbf on exit of
> memoedit
> Return - Don't update, ignore changes and return to calling program
>
> In the user function I do not have access to the "modified" memo string,
> so
> I don't know how to compare to the original.
>
> I guess I could change the Continue,Update,Return to after exit of the
> memoedit but if the user wants to continue I would have to re-enter the
> memoedit with the cNewText in place of cOrigText. I was hoping to
> determine
> the status of *changed* from within the UDF.
>
> Thanks for the suggestion. Any more ideas?
> PeterH
>
>
>
> "Stephen Quinn" <steveq@NOSPAMintegritynet.com.au> wrote in message
> news:1C43f.15838$U51.13291@news-server.bigpond.net.au...
> it
> it??
>
>



E.F.

2005-10-12, 6:55 pm

If you pass and preserve enough parameters you can exit MemoEdit, perform
the necessary logic and then re-enter it unbeknownst to user.

If you need details I will try to dig up my old code.

HTH, Eugene
========================================
=========
"PeterH" <petermhill@verizon.net> wrote in message
news:N%63f.18117$at1.2920@trnddc05...
> Steve, sorry for the confusion regarding "Return". From within the user
> function I give the uses three choices:
> Continue - Ignore and continue
> Update - Update the editing buffer and set flag to update dbf on exit of
> memoedit
> Return - Don't update, ignore changes and return to calling program
>
> In the user function I do not have access to the "modified" memo string,

so
> I don't know how to compare to the original.
>
> I guess I could change the Continue,Update,Return to after exit of the
> memoedit but if the user wants to continue I would have to re-enter the
> memoedit with the cNewText in place of cOrigText. I was hoping to

determine
> the status of *changed* from within the UDF.
>
> Thanks for the suggestion. Any more ideas?
> PeterH
>
>
>
> "Stephen Quinn" <steveq@NOSPAMintegritynet.com.au> wrote in message
> news:1C43f.15838$U51.13291@news-server.bigpond.net.au...
(if[color=darkred]
> it
> it??
>
>



PeterH

2005-10-12, 6:55 pm

Thanks to all for the suggestions. Based on the way MY code was designed,
Ian's suggestion of the reviewing lastkey() value worked out well, as I was
already knew the value if it. So all I had to do was to add *lChanged* to
the code as in:

nKey:=lastkey()
do case
case nKey....// special key handling
case nKey....// special key handling
case nKey....// special key handling
otherwise // normal key handling
if !lChanged
lChanged := nKey > 31 .or. nKey= K_DEL .or. nKey= K_BS
endif
endcase
Thanks again,
PeterH




"Ian Boys" <TooMuchSpam@BTInternet.com> wrote in message
news:dij6cs$jn7$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...
> In the UDF look at LASTKEY() each time and if it's > 31 or an editing key
> such as 7 (Del) or 8 (backspace) then set a flag to say that it has been
> edited.
>
> Personally I do the whole thing in a DO WHILE loop and actually compare

the
> two strings each time the user exits.
>
> Ian Boys
> DTE
>
>
> "PeterH" <petermhill@verizon.net> wrote in message
> news:N%63f.18117$at1.2920@trnddc05...
of[color=darkred]
(if[color=darkred]
Record ).[color=darkred]
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com