Sandy Blondino
8th February 2013, 19:02
Hello all,
I have several questions about programmabel dialogs in LN.
First of all, I don't really know where to start. Do I create a new session and the dialog code in the script? Is it a special type of session that has to be created? In which section does the dialog code belong?
I have the sample code from the programmers guide, but that just seems to be a portion.
I have code in session script. when I compile, I don't get errors, but when I try to run the session, I get the following error: "Illegal value 0 for size argument nr 1 for sym ' ' (alloc.form.arrays)[alloc.mem]
Not sure what that means.

Thanks for any help.
Sandy

vahdani
10th February 2013, 03:36
Hi Sandy,

a programmable dialog is actually a 3GL code and not a 4GL "Session" code. To start up with the example code do the following:

create a new script (say tczzzdialogtst) of type '3GL'
Cut and paste the sample script in the generated script
compile the script
start by 'start program' with program = otczzzdialogtst


Normally you would start a 3GL Program from your own session-scripts using one of the functions activate(), activate.and.sleep() or wait.and.activate()

Sandy Blondino
12th February 2013, 17:44
Thanks for your help. It works!

vahdani
20th February 2013, 17:16
Hi Sandy,

glad to be of help. After my last post it occurred to me, that there is no need to always have a 3GL-script. You could copy this example code into any other 4GL-script and rename the main() function to say show.dialog() and then call this function in an event of your script. Say as follows:


|declare the dialog variables
#include <bic_dialog>
extern domain ttaad.pacc pacc
...

choice.cont.process:
on.choice:
show.dialog()

functions:
|function main()
function show.dialog()
{
long dlg
long logno(3)
string logdesc(10,3)
.....
}
....