since apparently it seems unsolvable my problem,
tell me the correct way to insert the construction of the GET inside a my custom loop and make sure that at the end of DCREAD I can clean the memory and recreate the GET again?
for example:
DO WHILE .T.
GetList := {}
GetOptions:=NIL
lExit:=.F.
// recreate all GETs
@ ... DCGET a
@ ... DCGET b
@ ... DCGET c
DCGETOPTIONS ....
DCREAD GUI ....
IF lExit
EXIT
ENDIF
DC_GetDestroy(GetList)
ENDDO
thank you for the help you can give me. I would not want my program to fill its memory with unnecessary instructions and variables during operation
proper use of a loop & DCSAYGETs
Re: proper use of a loop & DCSAYGETs
Hi,
I have no idea whhat you want to accomplish? The default behaviour does what you want in my opinion?
You mention 'custom loop', maybe you can create your own 'handler', that way you can 'change' the default behaviour if you want something specific.
I have no idea whhat you want to accomplish? The default behaviour does what you want in my opinion?
You mention 'custom loop', maybe you can create your own 'handler', that way you can 'change' the default behaviour if you want something specific.
Re: proper use of a loop & DCSAYGETs
DCREAD GUI is the loop.
If you want to create a dialog to access, modify and insert data, you don't need to put a loop around it and create it again and again. Take a look at all the clauses DCSAYGETs have, like WHEN or EDITPROTECT or HIDE. Look at codeblocks as button captions. Look at DC_GetRefresh(GetList). Look at all the samples coming with eXpress++. Once you created a flexible dialog, everything can be done in one event loop, and this is DCREAD GUI. Put new data in the GETs, change button captions and behaviour, whatever you want.
If you want to create a dialog to access, modify and insert data, you don't need to put a loop around it and create it again and again. Take a look at all the clauses DCSAYGETs have, like WHEN or EDITPROTECT or HIDE. Look at codeblocks as button captions. Look at DC_GetRefresh(GetList). Look at all the samples coming with eXpress++. Once you created a flexible dialog, everything can be done in one event loop, and this is DCREAD GUI. Put new data in the GETs, change button captions and behaviour, whatever you want.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: proper use of a loop & DCSAYGETs
Hi Tom,
Thanks for the post. I started to doubt whether I was really the only one who didn't understand the problem.
So now we can go back to post 3 in this thread...
Thanks for the post. I started to doubt whether I was really the only one who didn't understand the problem.

So now we can go back to post 3 in this thread...
Re: proper use of a loop & DCSAYGETs
however, a point does not seem to work without an external loop:
"ENTER on last Get confirm all data, (same as Confirm button)" - using ENTEREXIT clause on DCREAD GUI
if the user navigates between the GETS and arrives at the bottom of the GETs, the program must ask whether or not we want to record the information exactly as if he press CONFIRM button
saying yes or no, the program must always remain inside the DCREAD loop (like pushbuttons CONFIRM, CANCEL)
"ENTEREXIT will exit the dialog if the ENTER key is pressed. The
exact behavior is determined by the DC_EnterExitMode() function.
The default behavior is to exit the dialog when the ENTER keys is
pressed in the "last GET". If this option is not used, then pressing
the ENTER key in the last GET will cause the first GET to receive
focus provided that SET WRAP is ON, otherwise pressing ENTER in the
last GET will have no affect."
this in my opinion it is not possible to simulate it inside the loop of the DCREAD if not going to intercept the last GET and create a trick to make sure to ask if you want to store or not all the data
Right?
I thank you for the patience you have with me to answer questions that for you could be simple but for me they are essential
"ENTER on last Get confirm all data, (same as Confirm button)" - using ENTEREXIT clause on DCREAD GUI
if the user navigates between the GETS and arrives at the bottom of the GETs, the program must ask whether or not we want to record the information exactly as if he press CONFIRM button
saying yes or no, the program must always remain inside the DCREAD loop (like pushbuttons CONFIRM, CANCEL)
"ENTEREXIT will exit the dialog if the ENTER key is pressed. The
exact behavior is determined by the DC_EnterExitMode() function.
The default behavior is to exit the dialog when the ENTER keys is
pressed in the "last GET". If this option is not used, then pressing
the ENTER key in the last GET will cause the first GET to receive
focus provided that SET WRAP is ON, otherwise pressing ENTER in the
last GET will have no affect."
this in my opinion it is not possible to simulate it inside the loop of the DCREAD if not going to intercept the last GET and create a trick to make sure to ask if you want to store or not all the data
Right?
I thank you for the patience you have with me to answer questions that for you could be simple but for me they are essential

Re: proper use of a loop & DCSAYGETs
Hi,
You could use a keyblock in the last get.
KEYBLOCK <bKeyBlock> is a code block to evaluate when a key is
pressed in the GET. The code block should be formatted as follows:
{|mp1,xNil,oXbp|MyFunc(mp1,xNil,oXbp)} where <mp1> is the
numeric value (defined in APPEVENT.CH) of the key pressed and
oXbp is the GET object.
In Myfunc you can check if mp1 is the ENTER key, so you can show a popup to proceed as you want.
You could use a keyblock in the last get.
KEYBLOCK <bKeyBlock> is a code block to evaluate when a key is
pressed in the GET. The code block should be formatted as follows:
{|mp1,xNil,oXbp|MyFunc(mp1,xNil,oXbp)} where <mp1> is the
numeric value (defined in APPEVENT.CH) of the key pressed and
oXbp is the GET object.
In Myfunc you can check if mp1 is the ENTER key, so you can show a popup to proceed as you want.
Re: proper use of a loop & DCSAYGETs
might be a good idea. I try to implement it. Thank you
Re: proper use of a loop & DCSAYGETs
Using the LOSTFOCUS clause (maybe in addition) at the last get should do the same job. Besides, (not only) if ENTEREXIT is used, CLOSEQUERY and ABORTQUERY (DCGET OPTIONS) allow to catch the quitting of a dialog, ask a question maybe and return to the dialog if needed. This not only works with ENTEREXIT, it also works with the X-button and other buttons added to close the dialog.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."