baldie
20th March 2006, 11:55
Maybe stupid question, but how can we exit a session which displays a message and after some time the session exits automatically.

I thought using the suspend-function. But don't know where to put this function in the programscript. I mean in which section.

Tanx.

mark_h
20th March 2006, 15:14
Choice.end.program and choice.abort.program are the two places you would need to add the suspend statement.

george7a
20th March 2006, 17:07
Hi,

If your are using the message() function (http://www.baanboard.com/programmers_manual_baanerp_help_functions_message_handling_message), it will wait until the user clicks on "Ok" then the program will continue (exit). So in this case you Suspend might be for nothing.

- George

baldie
21st March 2006, 09:42
Hi,

If your are using the message() function (http://www.baanboard.com/programmers_manual_baanerp_help_functions_message_handling_message), it will wait until the user clicks on "Ok" then the program will continue (exit). So in this case you Suspend might be for nothing.

- George

Hi george,

I put a mess() function in the section:
form.1:
init.form:

and also in the before.form:

But no success.
Can you tell me where to put this message.

Tanx.

baldie
21st March 2006, 09:44
Choice.end.program and choice.abort.program are the two places you would need to add the suspend statement.


Hi Marc,

tanx for you answer,

But I put it in both sections, but without success. Can you give me an example of a smaal script in which it should work.

Tanx.

george7a
21st March 2006, 12:31
Hi,

Check this link about 4GL choice sections (http://www.baanboard.com/programmers_manual_baanerp_help_4gl_features_4gl_choice_sections).

For more info check this link about 4GL event sections (http://www.baanboard.com/programmers_manual_baanerp_help_4gl_features_4gl_event_sections).

I hope it helps,

- George

mark_h
21st March 2006, 14:41
Hi Marc,

tanx for you answer,

But I put it in both sections, but without success. Can you give me an example of a smaal script in which it should work.

Tanx.

Well typically I do not do a message, usually I am validating input and prevent users from exiting the session until they enter correct data.

choice.end.program:
before.choice:
verify.allocations(false)

choice.abort.program:
before.choice:
verify.allocations(false)

The problem that you are having is with the mess function - this only displays on the sessions message line. I always use the message command so the user has to hit okay. This to me means that they read the message and did not ignore it. You can follow the links George posted.

Another option is to add a couple of status lines to the form. Then just populate them for the user as you exit the program.

Another option is that you can actually create an object with the message you want(search for create.object). This is kind of like creating your own window - way too much work for me. I have played with this, but never really used it.