Caner.B
20th June 2002, 15:44
Hi ,
Is it possible to make the bw error window to disappear on a customized session on a specific error.
and Instead of the bw error window displaying our own message
with message() function.
Thanks
Caner
OmeLuuk
21st June 2002, 11:16
There are two options:
1) Language dependent - you can use the message() function (see Tools programmers manual), where you can use text like this:
_if greeting.time then
__message("Hello World",1)
_endif
The 1 (put OK button on screen, wait for event) may be 0 (just display message).
2) Language independent - then you will need to predefine messages in Maintain Messages. The function used here is mess(). The use and options are discribed in the Tools manual.
3) There are several other ways too: display something on the bottom line of the session window instead of a popup, display a custom (hard coded) text with the mess function (in that case use a general string - I thought is was something like "tcgenstr" - as message, where it is defined as %s which means that you can put a string variable in its place.
The Tools Programmers Manual (Select menu Tools, press Help, Select Programmers Manual) should be your guide.
NPRao
21st June 2002, 20:13
Omeluuk,
The option-3 is -
Syntax
void status.field( long fieldnr, string strg(15) )
Description
This displays the specified message string in a specified status field of a 4GL form.
In previous BAAN releases, there were 5 status fields, numbered 1to 5. Status fields 1 to 4 in the current release correspond to fields 2 to 5 in previous releases. This function uses the old numbering system. For example:
status.field( 2, "replace" ) | displays message in first field
status.field( 3, "replace" ) | displays message in second field
Note
This function is supported for backward compatibility only. To display a message in the first status field, use status.mess() instead.
Context
Bshell function.
© 1998 Baan Development B.V. All rights reserved
Syntax
void status.mess( string strg(15) )
Description
This displays the specified message in the first status field of a 4GL form.
Context
3GL library function.
© 1998 Baan Development B.V. All rights reserved
Caner.B
25th June 2002, 16:20
Thanks for the replies,
But my main question is about the bw error window,
Has baan the functionality like vb's 'on error goto ...' or 'on error resume next'
I want to catch the error before it displays on screen and send my own message , if possible.
Thanks
Caner
NPRao
25th June 2002, 19:29
Hi Caner,
I dont know VB but here is a clue for you -
There is a predefined variable -
long error.bypass 4 Indicates which database errors can be detected in your program script, see the database functions for a detailed description.
© 1998 Baan Development B.V. All rights reserved
after every database actions etc, check the value of e and then put your own message code.