baanprog
12th April 2005, 14:09
Hi,
Code for getting Progress Indicator Bar in BaanIV.
Just One Line of Code and Its Cute!!.
Regards
mark_h
12th April 2005, 18:52
Great solution! Just tried it in one of my programs I am writing. It works, but I did have to add a display for the str.bar and I also had to make str.bar fixed. But it was simple and a great solution. :)
baanprog
13th April 2005, 13:57
I made the changes recommended by you and re-attached the document.
Regards
NPRao
13th April 2005, 21:33
baanprog,
Its good but I cant test it. I had few points to mention that your progress indicator would not work for 3-GL code and not portable on BaaN-V series.
The other solution works for both. Now I have them in a library and just call like the tools create.progress.indicator()
create.trans.progress.indicator
void create.trans.progress.indicator( const string title(),
[ long fg.color ], [ long bg.color ] )
Transparent Graphical Progress Indicator Bar
for 3-GL program there would not be a main window hence cannot set a
background color.
Input: title - title/caption for the progress indicator
fg.color - foreground colors - rgb schemes
bg.color - background colors - rgb schemes
You can use the following predefined colors:
RGB.BLACK RGB.BLUE RGB.YELLOW RGB.MAGENTA
RGB.GREEN RGB.GRAY RGB.RED RGB.WHITE
RGB.CYAN
change.trans.progress.indicator
void change.trans.progress.indicator( long perc, [ const string mesg() ] )
Change Transparent Graphical Progress Indicator Bar
inputs: perc - integer 0-100
destroy.trans.progress.indicator
void destroy.trans.progress.indicator( )
Destroys transparent progress indicator
baanprog
14th April 2005, 08:17
Hi NPRao,
I would wonder why it wont work in BaanV series, because both the functions string.set$ and chr$ are available for BaanV also.
I dont know whether in 3GL it would work I would have to test it.
Regards
NPRao
14th April 2005, 09:01
baanprog,
I meant bold and reverse on the form editor (DFE) and not string.set$ and chr$.
NPRao
14th April 2005, 21:30
baanprog -
Updates -
Functionality that is not supported with Webtop 3.0 for BaanIVc
Author S Woessmann Creation Date: 11 Oct 2004 Alternate ID:
Solution No: 166790 Last Modified: 12 Oct 2004 Status: Published
Product: ttB40c4 Sub Product: Session: Webtop
Package: tt Version: B40 Release: c4
Solution Type: OT: Standard Functionality
Progress Sessions
----------------------------
When the BaanIVc applications where developed, the tools did not yet offer a progress indicator facility. Therefore BaanIVc applications which want to show some kind of progress for a long lasting operation use a 4GL-form. This 4GL-form is updated on a regular basis to indicate to the end user the progress of the operation. This mechanism is not supported in the Webtop. When running such a long lasting operation in the Webtop, no form updates are sent to the user as long as the operation is running. The end-user will only see the busy indicator of the Webtop but will not get any feedback about the progress of the operation.
Since the BaanIVc tools now offer a progress indicator facility which is supported in both Webtop and Baan Windows, applications can be modified to show a proper progress indicator. The available progress indicator functions are implemented in library ottstpprogress and are identical to the functions available in BaanV.
baanprog
15th April 2005, 09:13
NPRao,
Thats really cool.
If I want to use it, should I download some tools patches?? Please advise.
Regards
Hitesh Shah
27th April 2005, 10:54
Hi,
Which inlcude we have to use so that compiler recognizes the mode argument of long type in ttstpprogress in Baan IV .
NPRao
27th April 2005, 20:28
Hitesh, BaaN-Prog,
I do not have access to BaaN-4 system, either someone else can give more information or you can contact the local BaaN/SSA support.
lbencic
27th April 2005, 21:05
It's a library in the tools, like ottstpapihand. Check if you have it in your:
$BSE/tools/ttB40_c4/ottstp
directory. If so, you can attach it as a library to your script using the library button, or simply put the following in the code:
#pragma used dll ottstpprogress
I have not used that progress library in Baan IV yet, but that's how we use the ottstpapihand library stored in the same place.
Edited: If you have it included and it is not recognizing a long where you think it should, do a bic_info6.1 on the object and see what your version is expecting.
Hitesh Shah
28th April 2005, 16:31
Lisa ,
The dll is existing. bic info has the function prototype but compiler does not accept the mode argument in the code.
if not create.progress.indicator("Productivity Progress",
progress.text.with.stop + progress.bar.with.stop) then
lbencic
28th April 2005, 16:54
When in doubt, find an example. It looks like the standard script tccom0214 uses this in Baan IV. They don't use the mode flags, they just pass a long:
create.progress.indicator("", 1)
change.progress.indicator(0, "Read Company Data")
destroy.progress.indicator()
Maybe play with it that way, it's not really documented.
NPRao
28th April 2005, 20:07
Hitesh,
Can you try to change the Mode options to capitals, I think they are #define declarations else try to use numbers: 1-4.
function extern create.progress.indicator(
const string title(),
long mode )
Desc: Create a progress indicator window
Args: - title of new window
Mode ( PROGRESS.TEXT, PROGRESS.TEXT.WITH.STOP,
PROGRESS.BAR, PROGRESS.BAR.WITH.STOP)
Ret : 0 Ok
-1 Error (probably another progress window exists)
lbencic
28th April 2005, 20:47
I tried with both. I think they are probably defines somewhere. The convention is to make defines all caps, but in reality defines are not case sensitive. In fact, when you compile with the option 'PROGRESS.TEXT', it throws the compile error " 'progress.text' not declared ".
Hitesh Shah
29th April 2005, 11:48
Lisa , I too thought of trying some long at random. But then thought of having the others experience in this regard. Still we don't know what 1 means for this dll . I have registered a case with SSA support to indicate how to use the dll.
NP , For constants it does not make any difference whether we write in small or upper case as Lisa said.
Thanks both of u for the help.