disable the unrecognized nls flag
[AROS-Contrib.git] / bgui / RexxBGUI / testver3.rexx
blob5af8233fbe9ebf4420c14214074f5caf8cbab612
1 /* REXX test script for rexxbgui.library */
3 if ~show('l','rexxbgui.library') then do
4 if ~addlib('rexxbgui.library',0,-30) then do
5 exit(20)
6 end
7 else nop
8 end
9 else nop
11 call bguiopen() /* causes error 12 if it did not work */
12 /* supply a second argument for a '0' return code instead of an ARexx
13 error */
15 signal on syntax /* important: bguiclose() MUST be called */
16 signal on halt
17 signal on break_c
19 esc='1B'x
20 lf='0A'x
21 cr='0D'x
22 grspace.narrow=-1
23 grspace.normal=-2
24 grspace.wide=-3
26 call bguilist('cycent','Entry #1','Entry #2','Entry #3','Entry #4',,
27 'Entry #5')
29 /* using ARexx feature: ,<newline> is translated to nothing */
30 /* the || are essential - any added space will cause trouble */
31 /* redefining the same ID makes previous buttons unaccessible */
32 /* do not redefine winclose etc. */
34 g=bguivgroup(,
35 bguiinfo('inf',,esc'cRexxBGUI 3.0 new features')||,
36 bguihseparator('Versions')||bguilayout(LGO_FixMinHeight,1)||,
37 bguiinfo('ver','BGUI',bguiversion())||,
38 bguiinfo('rver','RexxBGUI',bguirexxversion())||,
39 bguiinteger('vertest','_Test BGUI version 41.')||bguilayout(LGO_FixMinHeight,1)||,
40 bguihseparator('Vertical separator')||bguilayout(LGO_FixMinHeight,1)||,
41 bguihgroup(,
42 bguibutton('noop1','_Some button')||,
43 bguivseparator()||bguilayout(LGO_FixMinWidth,1)||,
44 bguibutton('noop2','_Another button'),
45 )||,
46 bguihseparator('Cycle gadgets')||bguilayout(LGO_FixMinHeight,1)||,
47 bguicycle('cyc1','_Normal','cycent','N')||bguilayout(LGO_FixMinHeight,1)||,
48 bguicycle('cyc2','_Forced popup','cycent','P')||bguilayout(LGO_FixMinHeight,1)||,
49 bguihseparator()||bguilayout(LGO_FixMinHeight,1)||,
50 bguihgroup(,
51 bguivarspace(50)||,
52 bguibutton('quit','_Quit')||,
53 bguivarspace(50),
54 )||bguilayout(LGO_FixMinHeight,1),
55 ,grspace.normal,grspace.normal)
57 a=bguiwindow('RexxBGUI 3.0 new features',g,50,'-0',,arg(1))
59 if bguiwinopen(a)=0 then bguierror(12)
61 id=0
62 do while bguiwinwaitevent(a,'ID')~=id.winclose
63 select
64 when id=id.quit then leave
65 when id=id.winclose then nop
66 when id=id.vertest then do
67 rev=bguiget(obj.vertest,STRINGA_LongVal)
68 if bguiversion(41,rev) then,
69 call bguireq('At least version 41.'rev 'of BGUI.','*_OK',,a)
70 else,
71 call bguireq('Version 41.'rev 'of BGUI not available.','*_OK',,a)
72 end
73 otherwise
74 end
75 end
76 rc=0
78 syntax:
79 if rc~=0 then say '+++ ['rc']' errortext(rc) 'at line' sigl
80 call bguiclose()
81 exit 0
83 break_c:
84 halt:
85 rc=0
86 say '+++ Break at line' sigl
87 signal syntax