Hi,
     This is either a bug report or an  'I'm clueless' depending on  the
answer.
I'm in vtcl 1.6 and 1.8 on HPUX,  wish 4.2

I did the following: (roughly).
Create a toplevel.
Create a button:
Create a pair of radiobuttons  connected to the same variabl, var1,   (
in the attribute editor)
with values 'grow' and 'shrink'.
The button just writes var 1 to stdout.  ( and of course should be
labeled 'Drink Me'.)
I go to test mode and it works. ( It writes 'grow' or 'shrink' as
appropriate.)
I do a save.

In vtcl I can look in  the Variable list and see  the variable var1. 
In  the  toplevel  code it says  
global var1;  var1='grow'           # note that welch says that a global
at the top level does nothing.  p52 ?

But, there's not a global statement in the procedure;

proc  vTclWindow.top17

which holds that actual buttons,  so this global variable and the
variable in the  vTclWindow
procedure are  not really the same variable (true?)

So, If I now go into init or some other  procedure and try to acess the
global variable 
var1, (ie   global var1;  puts stdout var1)  it doesn't see the
value  set by the checkbuttons.  

So,  is there a way to  make the variable global so that  they can be
seen in other processes?
( other than editing the code of course  :)  

Bug  or feature ( or cluelessness:)?

Code  is  attached.

 

begin 600 test1.tcl
M(R$O9VQO8F%L+V,P-3(Y+V%E-CDV,70O56YI>"]B:6XO=VES: HC(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PHC(%9I<W5A;"!48VP@=C$N,#@@
M4')O:F5C= HC"@HC(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,*
M(R!'3$]"04P@5D%224%"3$53"B,*9VQO8F%L('9A<C$[('-E="!V87(Q('M3
M:')I;FM]"F=L;V)A;"!W:61G970[( HC(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,*(R!54T52($1%1DE.140@4%)/0T5$55)%4PHC"G!R;V,@
M:6YI="![87)G8R!A<F=V?2!["@I]"@II;FET("1A<F=C("1A<F=V"@H*<')O
M8R!M86EN('MA<F=C(&%R9W9]('L*"GT*"G!R;V,@5VEN9&]W('MA<F=S?2![
M"F=L;V)A;"!V5&-L"B @("!S970@8VUD(%ML:6YD97@@)&%R9W,@,%T*(" @
M('-E="!N86UE(%ML:6YD97@@)&%R9W,@,5T*(" @('-E="!R97-T(%ML<F%N
M9V4@)&%R9W,@,B!E;F1="B @("!I9B![)&YA;64@/3T@(B(@?'P@)&-M9" ]
M/2 B(GT@>W)E='5R;GT*(" @('-E="!E>&ES=',@6W=I;F9O(&5X:7-T<R D
M;F%M95T*(" @('-W:71C:" D8VUD('L*(" @(" @("!S:&]W('L*(" @(" @
M(" @(" @:68@>UMI;F9O('!R;V-S('948VQ7:6YD;W<H<')E*21N86UE72 A
M/2 B(GT@>PH@(" @(" @(" @(" @(" @=E1C;%=I;F1O=RAP<F4I)&YA;64@
M)')E<W0*(" @(" @(" @(" @?0H@(" @(" @(" @("!I9B![6VEN9F\@<')O
M8W,@=E1C;%=I;F1O=R1N86UE72 A/2 B(GT@>PH@(" @(" @(" @(" @(" @
M=E1C;%=I;F1O=R1N86UE"B @(" @(" @(" @('T*(" @(" @(" @(" @:68@
M>UMI;F9O('!R;V-S('948VQ7:6YD;W<H<&]S="DD;F%M95T@(3T@(B)]('L*
M(" @(" @(" @(" @(" @('948VQ7:6YD;W<H<&]S="DD;F%M92 D<F5S= H@
M(" @(" @(" @("!]"B @(" @(" @?0H@(" @(" @(&AI9&4@(" @>R!I9B D
M97AI<W1S('MW;2!W:71H9')A=R D;F%M93L@<F5T=7)N?2!]"B @(" @(" @
M:6-O;FEF>2![(&EF("1E>&ES=',@>W=M(&EC;VYI9GD@)&YA;64[(')E='5R
M;GT@?0H@(" @(" @(&1E<W1R;WD@>R!I9B D97AI<W1S('MD97-T<F]Y("1N
M86UE.R!R971U<FY]('T*(" @('T*?0H*(R,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C(R,C(R,C"B,@5E1#3"!'14Y%4D%4140@1U5)(%!23T-%1%5215,*
M(PH*<')O8R!V5&-L5VEN9&]W+B![87)G<WT@>PH@(" @<V5T(&)A<V4@+@H@
M(" @(R,C(R,C(R,C(R,C(R,C(R,C(PH@(" @(R!#4D5!5$E.1R!7241'1513
M"B @(" C(R,C(R,C(R,C(R,C(R,C(R,C"B @("!W;2!F;V-U<VUO9&5L("X@
M<&%S<VEV90H@(" @=VT@9V5O;65T<GD@+B R,#!X,C P*S K, H@(" @=VT@
M;6%X<VEZ92 N(#[email protected]"B @("!W;2!M:6YS:7IE("X@,2 Q"B @("!W
M;2!O=F5R<FED97)E9&ER96-T("X@, H@(" @=VT@<F5S:7IA8FQE("X@,2 Q
M"B @("!W;2!W:71H9')A=R N"B @("!W;2!T:71L92 N(")V="YT8VPB"B @
M(" C(R,C(R,C(R,C(R,C(R,C(R,C"B @(" C(%-%5%1)3D<@1T5/34544ED*
M(" @(",C(R,C(R,C(R,C(R,C(R,C(R,*?0H*<')O8R!V5&-L5VEN9&]W+G1O
M<#$W('MA<F=S?2!["B @("!S970@8F%S92 N=&]P,3<*(" @(&EF('M;=VEN
M9F\@97AI<W1S("YT;W Q-UU]('L*(" @(" @("!W;2!D96EC;VYI9GD@+G1O
M<#$W.R!R971U<FX*(" @('T*(" @(",C(R,C(R,C(R,C(R,C(R,C(R,*(" @
M(",@0U)%051)3D<@5TE$1T544PH@(" @(R,C(R,C(R,C(R,C(R,C(R,C(PH@
M(" @=&]P;&5V96P@+G1O<#$W("UC;&%S<R!4;W!L979E;"!<"B @(" @(" @
M+6)A8VMG<F]U;F0@(V,W8S=C-R M8F]R9&5R=VED=&@@-" M<F5L:65F(&=R
M;V]V92 *(" @('=M(&9O8W5S;6]D96P@+G1O<#$W('!A<W-I=F4*(" @('=M
M(&=E;VUE=')Y("YT;W Q-R R,#!X,C P*S(Q-RLR,C8*(" @('=M(&UA>'-I
M>F4@+G1O<#$W(#[email protected]"B @("!W;2!M:6YS:7IE("YT;W Q-R Q(#$*
M(" @('=M(&]V97)R:61E<F5D:7)E8W0@+G1O<#$W(# *(" @('=M(')E<VEZ
M86)L92 N=&]P,3<@,2 Q"B @("!W;2!D96EC;VYI9GD@+G1O<#$W"B @("!W
M;2!T:71L92 N=&]P,3<@(G1O<#$W(@H@(" @9G)A;64@+G1O<#$W+F9R83$X
M(%P*(" @(" @(" M8F%C:V=R;W5N9" C0S@P,$,X,#!#.# P("UB;W)D97)W
M:61T:" Q("UH96EG:'0@,S @+7)E;&EE9B!G<F]O=F4@7 H@(" @(" @("UW
M:61T:" S," *(" @(&)U='1O;B N=&]P,3<N9G)A,3@N8G5T,3D@7 H@(" @
M(" @("UB86-K9W)O=6YD("-#.# P0S@P,$,X,# @+6-O;6UA;F0@>W!U=',@
M("1V87(Q?2!<"B @(" @(" @+69O;G0@+6)I='-T<F5A;2UP<F5S=&EG92UM
M961I=6TM<BUN;W)M86PM+3$Y+3$V,"TW,BTW,BUM+3$Q,"UH<"UR;VUA;C@@
M7 H@(" @(" @("UF;W)E9W)O=6YD("-&1D9&1D9&1D9&1D8@+7!A9'@@,3$@
M+7!A9'D@-" M=&5X="![4'5S:"!-97T@"B @("!R861I;V)U='1O;B N=&]P
M,3<N<F%D,C @7 H@(" @(" @("UB86-K9W)O=6YD("-#.# P0S@P,$,X,# @
M7 H@(" @(" @("UF;VYT("UB:71S=')E86TM<')E<W1I9V4M;65D:75M+7(M
M;F]R;6%L+2TQ.2TQ-C M-S(M-S(M;2TQ,3 M:' M<F]M86XX(%P*(" @(" @
M(" M9F]R96=R;W5N9" C1D9&1D9&1D9&1D9&("UT97AT(%-H<FEN:R M=F%L
M=64@4VAR:6YK("UV87)I86)L92!V87(Q( H@(" @<F%D:6]B=71T;VX@+G1O
M<#$W+G)A9#(Q(%P*(" @(" @(" M8F%C:V=R;W5N9" C0S@P,$,X,#!#.# P
M(%P*(" @(" @(" M9F]N=" M8FET<W1R96%M+7!R97-T:6=E+6UE9&EU;2UR
M+6YO<FUA;"TM,3DM,38P+3<R+3<R+6TM,3$P+6AP+7)O;6%N."!<"B @(" @
M(" @+69O<F5G<F]U;F0@(T9&1D9&1D9&1D9&1B M=&5X="!'<F]W("UV86QU
M92!'<F]W("UV87)I86)L92!V87(Q( H@(" @(R,C(R,C(R,C(R,C(R,C(R,C
M(PH@(" @(R!3151424Y'($=%3TU%5%)9"B @(" C(R,C(R,C(R,C(R,C(R,C
M(R,C"B @("!P;&%C92 N=&]P,3<N9G)A,3@@7 H@(" @(" @("UX(#4@+7D@
M-2 M=VED=&@@,3$T("UH96EG:'0@-S@@+6%N8VAO<B!N=R M8F]R9&5R;6]D
M92!I9VYO<F4@"B @("!P;&%C92 N=&]P,3<N9G)A,3@N8G5T,3D@7 H@(" @
M(" @("UX(#,@+7D@,34@+6%N8VAO<B!N=R M8F]R9&5R;6]D92!I9VYO<F4@
M"B @("!P;&%C92 N=&]P,3<N<F%D,C @7 H@(" @(" @("UX(#$R("UY(#DP
M("UA;F-H;W(@;G<@+6)O<F1E<FUO9&4@:6=N;W)E( H@(" @<&QA8V4@+G1O
M<#$W+G)A9#(Q(%P*(" @(" @(" M>" Q." M>2 Q,C8@+6%N8VAO<B!N=R M
M8F]R9&5R;6]D92!I9VYO<F4@"GT*"E=I;F1O=R!S:&]W("X*5VEN9&]W('-H
<;W<@+G1O<#$W"@IM86EN("1A<F=C("1A<F=V"B!S
`
end

Reply via email to