[Seaside] Class Variable Browser Fix

Josef Springer Josef.Springer at joops.com
Thu Jul 14 08:05:31 UTC 2011


Hello Ted,

i think it is better to use 'binding value canRespondTo:' instead of  
'binding value class selectors includes:' because #canRespondTo: 
includes all superclasses of 'binding value' too.

mit freundlichen Grüßen / best regards,
Josef Springer
(Geschäftsleitung/Management)

Postal
	Address
	_Josef.Springer at joops.com_
	Orlando-di-Lasso Str. 2
	D-85640 Putzbrunn
Phone
	Office
	+49 (0)89 600 6920
	
	
Phone 	Fax
	+49 (0)89 600 69220
	
	
Web
	Web
	http://www.joops.com
	
	

JOOPS
	(HRB München 86239)

*-- the software company --*


Ted Wrinch wrote:
> Found another one Lukas,
>
> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back. My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode:
>
> globalReference
> 	| binding |
> 	target hasSelector
> 		ifFalse: [ ^ nil ].
> 	(requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode))
> 		ifTrue: [ ^ binding value asNode ].
> 	(binding := Smalltalk classNamed: target selector) notNil
> 		ifTrue: [ ^ binding value asNode ].
> 	^ nil
>
>
> T.
>
> Ted Wrinch
>
>
>
>
> On 13 Jul 2011, at 08:31, Lukas Renggli wrote:
>
>   
>> Thanks I integrated it with
>>
>>  Name: OB-Standard-lr.543
>>  Author: lr
>>  Time: 13 July 2011, 9:31:10 am
>>  UUID: 51c5067d-fa7e-4d02-8c4a-84fce6c421b2
>>  Ancestors: OB-Standard-lr.542
>>
>>  - fixes a problem with references of class variables (thanks go to Ted Wrinch)
>>
>> Lukas
>>
>> On 13 July 2011 08:42, Ted Wrinch <ted.wrinch at gmail.com> wrote:
>>     
>>> Hi All,
>>>
>>> There seems to be a buglet in the browser concerning class variables. When you select and right click on a class variable in the browser it brings up a walk-back. I'm not sure what the procedure is for applying fixes to the code base and have included the fix below:
>>>
>>> OBCmdBrowseReferencesOfIt>>globalReference
>>>        | binding |
>>>        target hasSelector
>>>                ifFalse: [ ^ nil ].
>>>        (requestor selectedClass notNil and: [ (binding := requestor selectedClass bindingOf: target selector) notNil and:[binding value notNil] ])
>>>                ifTrue: [ ^ binding value asNode ].
>>>        (binding := Smalltalk classNamed: target selector) notNil
>>>                ifTrue: [ ^ binding value asNode ].
>>>        ^ nil
>>>
>>> I've added the phrase: "and:[binding value notNil]".
>>>
>>> T.
>>>
>>> Ted Wrinch
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>>       
>>
>> -- 
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>     
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>   


-------------- next part --------------
Skipped content of type multipart/related


More information about the seaside mailing list