SriksAdi
30th August 2004, 08:35
Hi All,
I am on BaanIVc4 - SP15.
I tried to use RUSH with Sales Orders and Display Customers List.
In both the cases, I could successfully generate the script. But on compiling the generated script, I am facing these compilation errors:

ptccom1510010( 56): Error: Function 'before.program' already declared.
ptccom1510010( 65): Error: Missing RETURN(..) in function 'g_check_input_funcs'
ptccom1510010( 77): Error: Missing RETURN(..) in function 'library_has_maintable'
ptccom1510010( 89): Error: Missing RETURN(..) in function 'tcedi0052.get.next.btno'
ptccom151001g( 116): Error: Function 'library_has_maintable' already declared.
ptccom151001g( 121): Error: Inconsistent number of args function 'g_check_input_funcs' line ptccom1510010(61)
ptccom151001g( 122): Error: Function 'g_check_input_funcs' already declared.
ptccom151001g( 123): Error: 'count' not declared

I have commented a few functions before.program(), g_check_input_funcs(), library_has_maintable(), tcedi0052.get.next.btno and g_check_input_funcs and it went through.

Does it have a fix or shall I continue to comment the script ?
One problem I forsee in commenting is, the before.program of the parent would not be executed.

I have attached the script generated by RUSH

Regards
Sriks

dnnslbrwn
30th August 2004, 22:21
I opened your file and you seem to be missing the following lines at the end of the before.program: section and right before your first function. This is normally generated code, so something weird is happening. But first drop this in and see if it compiles.....



parent.object.function.id = get_function(parent.object.dll.id, "before.program")
parent.object.error = exec_function(parent.object.dll.id, parent.object.function.id)
|******************************* functions ***********************************
functions:

SriksAdi
31st August 2004, 08:50
Hi,
I have added the lines of code. Still no luck.

regards
Sriks

~Vamsi
31st August 2004, 19:21
Looks like a bug to me in the Rush code generating portion. As you can see, there is a before.program section in the parent program. Rush does not seem to compensate for that. So the generated code needs to be modified perhaps as below.

Move the code from the function before.program() to the end of the section before.program:
Add the keyword "functions:" at an appropriate location
Delete the function before.program()

SriksAdi
1st September 2004, 08:11
Hi Vamsi,
I have done the modifications said by you. I could pretty well supress the errors related to before.program, but the errors still exist in the functions 'g_check_input_funcs' , 'library_has_maintable' and 'tcedi0052.get.next.btno'

For the time being I have commented these functions and it works.


regards
Sriks