bug in RadioButtonSetPresenter>>disableAll

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in RadioButtonSetPresenter>>disableAll

James Foster-3
The attached demonstrates the problem. The fix is to modify
RadioButtonSetPresenter>>disableAll as follows:

disableAll
"self radioButtons do: [:each | self disable: each]"            "bad"
 self radioButtons do: [:each | self disable: each name]    "good"


begin 666 MyShell.cls
M(D9I;&5D(&]U="!F<F]M($1O;'!H:6X@4VUA;&QT86QK(%@V(B$-"@T*4VAE
M;&P@<W5B8VQA<W,Z("-->5-H96QL#0H):6YS=&%N8V5687)I86)L94YA;65S
M.B G<F%D:6]"=71T;VY39710<F5S96YT97(G#0H)8VQA<W-687)I86)L94YA
M;65S.B G)PT*"7!O;VQ$:6-T:6]N87)I97,Z("<G#0H)8VQA<W-);G-T86YC
M959A<FEA8FQE3F%M97,Z("<G(0T*37E3:&5L;"!G=6ED.B H1U5)1"!F<F]M
M4W1R:6YG.B G>T4U13%!-48S+3@W0C8M-$(Q."TX,T-#+3<U0T(W03E#-D)"
M,GTG*2$-"DUY4VAE;&P@8V]M;65N=#H@)R<A#0HA37E3:&5L;"!C871E9V]R
M:65S1F]R0VQA<W,A3590+5!R97-E;G1E<G,A("$-"B%->5-H96QL(&UE=&AO
M9'-&;W(A#0H-"F-R96%T94-O;7!O;F5N=',-"@T*"7-U<&5R(&-R96%T94-O
M;7!O;F5N=',N#0H)<F%D:6]"=71T;VY39710<F5S96YT97(@.CT@<V5L9B!A
M9&0Z(%)A9&EO0G5T=&]N4V5T4')E<V5N=&5R(&YE=R!N86UE.B G<F%D:6]"
M=71T;VY3970G+@T*#0HA#0H-"F1I<V%B;&52861I;T)U='1O;E-E= T*#0H)
M<F%D:6]"=71T;VY39710<F5S96YT97(@9&ES86)L94%L;"X-"B$-"@T*;VY6
M:65W3W!E;F5D#0H-"@ES=7!E<B!O;E9I97=/<&5N960N#0H)<F%D:6]"=71T
M;VY39710<F5S96YT97(@9&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4V5A<F-H4&]L:6-Y*2 @-#4Y,C<P(",C*%-M86QL
M=&%L:RY-97-S86=E*2 @." C/2 Y." P(#$S.30@." C:&%S:" Y." P(#,R
M(#0X,B Q,38X(# @-R P(# @," Q,C0X(# @." T,CDT.3 R.3$Q(#@U,C0X
M-B C(RA3;6%L;'1A;&LN3G5L;$-O;G9E<G1E<BD@(# @," P(#<U-" R,#(@
M,C X(#DX(#(@.#$X(#@T." Y." R(#4S," Q(#$@-3,P(#$X,2 V-2 Q,C0X
M(#@Q." Y,C@@.3@@,2 X("=/<'1I;VX@,2<@,3(T." Y-S@@." C6S0T(# @
M," P(# @," P(# @,2 P(# @," R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R
M-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@," P(# @
M," P(# @," P(#DP(# @," P(#,R(# @," P72 Y." P(#$P-# @," R-R X
M("=O<'1I;VXQ)R T,3 @,3(V-" Y." Q-B P(#$P-S(@.3@@,B X(#$Q-# Y
M,C0T,C4@,2 Q-SDR(#$S,S @," P(#$S-C(@,3,Y-" Q-#(T(#DX(# @,3,Y
M-" Q-#<R(#DX(# @,S(@-#@R(#$Q-C@@," W(# @," P(#$W.3(@," X(#0R
M.30Y,#(Y,3$@,34S." P(# @," W-30@,C R(#(P." Y." R(#@Q." X-#@@
M.3@@,B U,S @,2 Q,C<@-3,P(#$X,2 V-2 Q-SDR(#@Q." Y,C@@.3@@,2 X
M("=/<'1I;VX@,R<@,3<Y,B Y-S@@." C6S0T(# @," P(# @," P(# @,2 P
M(# @," R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@
M,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@," P(# @," V,R P(# @," Y," P
M(# @," Y-2 P(# @,%T@.3@@," Q,#0P(# @,C<@." G;W!T:6]N,R<@-#$P
M(#$R-C0@.3@@,38@," Q,#<R(#DX(#(@." Q,30P.3(T-#(U(#$@,C(R-" Q
M,S,P(# @," Q,S8R(#$S.30@,30R-" Y." P(#$S.30@,30W,B Y." P(#,R
M(#0X,B Q,38X(# @-R P(# @," R,C(T(# @." T,CDT.3 R.3$Q(#$U,S@@
M," P(# @-S4T(#(P,B R,#@@.3@@,B X,3@@.#0X(#DX(#(@-3,P(#$@-C4@
M-3,P(#$X,2 V,R R,C(T(#@Q." Y,C@@.3@@,2 X("=/<'1I;VX@,B<@,C(R
M-" Y-S@@." C6S0T(# @," P(# @," P(# @,2 P(# @," R-34@,C4U(#(U
M-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U
M(#(U-2 R-34@," P(# @," S,B P(# @," Y," P(# @," V,R P(# @,%T@
M.3@@," Q,#0P(# @,C<@." G;W!T:6]N,B<@," W-30@,C R(#(P." Y." Q
M(#@Q." X-#@@.3@@,B U,S @.#$@-S$@-3,P(#$X,2 Q.3$@,3 W,B Y-S@@
M." C6S0T(# @," P(# @," P(# @,2 P(# @," R-34@,C4U(#(U-2 R-34@
M,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R
M-34@-# @," P(# @,S4@," P(# @,3,P(# @," P(#$S," P(# @,%T@.3@@
M,R Q,C0X(#(R,C0@,3<Y,B Q,#0P(# @,C<@." G<F%D:6]"=71T;VY3970G
M(# @," P(# @," Q(# @," P(# @,2 P(# @-S4T(#(P,B R,#@@.3@@,B X
M,3@@.#0X(#DX(#(@-3,P(#(U-3D@,C$@-3,P(#0P,2 T,#$@-#$V(#@Q." X
M("-U<&1A=&5-96YU0F%R(#DX(# @-#$V(#DW." X("-;-#0@," P(# @," P
M(# @," P(# @," P(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@
M,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@,C4U(#(U-2 R-34@-" P(# @,3 @
M," P(# @,3DY(#4@," P(#(Q," P(# @,%T@.3@@,B Q,#<R(#4Y,B Q,#0P
M(# @,C<@*2$@(0T*(4UY4VAE;&P@8VQA<W,@8V%T96=O<FEE<T9O<CH@(W)E
M<V]U<F-E7T1E9F%U;'1?=FEE=R%P=6)L:6,A<F5S;W5R8V5S+79I97=S(2 A
$#0H-"@``
`
end


Reply | Threaded
Open this post in threaded view
|

Re: bug in RadioButtonSetPresenter>>disableAll

James Foster-3
Andy/Blair,
Do you need anything further from me on this?
James

On 28 Nov 2005 "James Foster" <[hidden email]> wrote in message
news:438b969f$[hidden email]...
> The attached demonstrates the problem. The fix is to modify
> RadioButtonSetPresenter>>disableAll as follows:
>
> disableAll
> "self radioButtons do: [:each | self disable: each]"            "bad"
> self radioButtons do: [:each | self disable: each name]    "good"
>
>


Reply | Threaded
Open this post in threaded view
|

Re: bug in RadioButtonSetPresenter>>disableAll

Ian Bartholomew-21
James,

> Do you need anything further from me on this?

Just FYI.

Both of those posts had attachments so a lot of news servers will have
deleted them on sight, as part of their anti spam/anti virus protection.
  The theory being that only binary news groups should have messages
with attachments.

I monitor 4 news servers to get the articles for the news archive.  The
TotallyObjects server, obviously, had both of your posts.  TeraNews only
had one (?) and NewsIndividualNet and my ISP didn't have either.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Bug in RadioButtonSetPresenter>>disableAll

James Foster-3
In reply to this post by James Foster-3
The following demonstrates the problem. The fix is to modify
RadioButtonSetPresenter>>disableAll as follows:

disableAll
"self radioButtons do: [:each | self disable: each]"            "bad"
self radioButtons do: [:each | self disable: each name]    "good"

--------------------
"Filed out from Dolphin Smalltalk X6"!

Shell subclass: #MyShell
 instanceVariableNames: 'radioButtonSetPresenter'
 classVariableNames: ''
 poolDictionaries: ''
 classInstanceVariableNames: ''!
MyShell guid: (GUID fromString: '{E5E1A5F3-87B6-4B18-83CC-75CB7A9C6BB2}')!
MyShell comment: ''!
!MyShell categoriesForClass!MVP-Presenters! !
!MyShell methodsFor!

createComponents

 super createComponents.
 radioButtonSetPresenter := self add: RadioButtonSetPresenter new name:
'radioButtonSet'.

!

disableRadioButtonSet

 radioButtonSetPresenter disableAll.
!

onViewOpened

 super onViewOpened.
 radioButtonSetPresenter disableAll.
! !
!MyShell categoriesFor: #createComponents!public! !
!MyShell categoriesFor: #disableRadioButtonSet!public! !
!MyShell categoriesFor: #onViewOpened!public! !

!MyShell class methodsFor!

resource_Default_view
 "Answer the literal data from which the 'Default view' resource can be
reconstituted.
 DO NOT EDIT OR RECATEGORIZE THIS METHOD.

 If you wish to modify this resource evaluate:
 ViewComposer openOn: (ResourceIdentifier class: self selector:
#resource_Default_view)
 "

 ^#(#'!!STL' 3 788558 10 ##(Smalltalk.STBViewProxy)  8
##(Smalltalk.ShellView)  98 27 0 0 98 2 27131905 131073 416 0 524550
##(Smalltalk.ColorRef)  8 4278190080 328198 ##(Smalltalk.Point)  401 401 551
0 0 0 416 0 234 256 98 4 410 8 ##(Smalltalk.PushButton)  98 17 0 416 98 2 8
1140924416 1 592 0 0 0 7 0 0 0 592 0 8 4294902911 1180998 4
##(Smalltalk.CommandDescription)  8 #disableRadioButtonSet 8 'Disable' 1 1 0
0 32 983302 ##(Smalltalk.MessageSequence)  202 208 98 2 721670
##(Smalltalk.MessageSend)  8 #createAt:extent: 98 2 530 101 281 530 141 51
592 818 8 #text: 98 1 8 'Disable' 592 983302 ##(Smalltalk.WINDOWPLACEMENT)
8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 50 0 0 0 140 0 0 0 120 0 0 0 165 0 0 0] 98 0 530 193 193 0
27 8 'disablePushButton' 410 8 ##(Smalltalk.ContainerView)  98 15 0 416 98 2
8 1140850688 131073 1072 0 482 8 4278190080 0 7 0 0 0 1072 656390
##(Smalltalk.GridLayout)  1 3 1 1 234 256 98 6 410 8
##(Smalltalk.RadioButton)  98 16 0 1072 98 2 8 1141055497 1 1248 721990 2
##(Smalltalk.ValueHolder)  0 0 1376774 ##(Smalltalk.PluggableSearchPolicy)
459270 ##(Smalltalk.Message)  8 #= 98 0 1394 8 #hash 98 0 32 482 1168 0 7 0
0 0 1248 0 8 4294902911 852486 ##(Smalltalk.NullConverter)  0 0 0 754 202
208 98 2 818 848 98 2 530 1 1 530 181 65 1248 818 928 98 1 8 'Option 1' 1248
978 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255 255 255 255 255
255 255 255 255 255 0 0 0 0 0 0 0 0 90 0 0 0 32 0 0 0] 98 0 1040 0 27 8
'option1' 410 1264 98 16 0 1072 98 2 8 1140924425 1 1792 1330 0 0 1362 1394
1424 98 0 1394 1472 98 0 32 482 1168 0 7 0 0 0 1792 0 8 4294902911 1538 0 0
0 754 202 208 98 2 818 848 98 2 530 1 127 530 181 65 1792 818 928 98 1 8
'Option 3' 1792 978 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255 255 255
255 255 255 255 255 255 255 255 255 0 0 0 0 63 0 0 0 90 0 0 0 95 0 0 0] 98 0
1040 0 27 8 'option3' 410 1264 98 16 0 1072 98 2 8 1140924425 1 2224 1330 0
0 1362 1394 1424 98 0 1394 1472 98 0 32 482 1168 0 7 0 0 0 2224 0 8
4294902911 1538 0 0 0 754 202 208 98 2 818 848 98 2 530 1 65 530 181 63 2224
818 928 98 1 8 'Option 2' 2224 978 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 32 0 0 0 90 0 0
0 63 0 0 0] 98 0 1040 0 27 8 'option2' 0 754 202 208 98 1 818 848 98 2 530
81 71 530 181 191 1072 978 8 #[44 0 0 0 0 0 0 0 1 0 0 0 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 40 0 0 0 35 0 0 0 130 0 0 0 130
0 0 0] 98 3 1248 2224 1792 1040 0 27 8 'radioButtonSet' 0 0 0 0 0 1 0 0 0 0
1 0 0 754 202 208 98 2 818 848 98 2 530 2559 21 530 401 401 416 818 8
#updateMenuBar 98 0 416 978 8 #[44 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 255
255 255 255 255 255 255 255 255 255 255 255 255 4 0 0 10 0 0 0 199 5 0 0 210
0 0 0] 98 2 1072 592 1040 0 27 )! !
!MyShell class categoriesFor: #resource_Default_view!public!resources-views!
!


Reply | Threaded
Open this post in threaded view
|

Re: Bug in RadioButtonSetPresenter>>disableAll

Blair McGlashan-3
"James Foster" <[hidden email]> wrote in message
news:43946f89$[hidden email]...
> The following demonstrates the problem. The fix is to modify
> RadioButtonSetPresenter>>disableAll as follows:
>
> disableAll
> "self radioButtons do: [:each | self disable: each]"            "bad"
> self radioButtons do: [:each | self disable: each name]    "good"
>

Thanks James, recorded as #2047.

Regards

Blair