several uses of #ifNotNil: in PierSecurity (Pier2)
Lukas Renggli
renggli at gmail.com
Thu Jun 17 09:25:51 MEST 2010
> I did a #senders in Pharo 1.0 with Pier installed and the offenders don't
> show up, but if you look at the following methods you'll see them:
>
> PRStructure>>group:
> PRStructure>>owner:
> PUSecurity class>>onStructureAdded:
>
> other senders (using the zero arg form) are:
>
> MAComponentRenderer>>hasError:
> MAFileUploadComponent>>remove
> PRCase>>document:
>
> Seems that there is a bug in senders...
I reported it here: http://code.google.com/p/pharo/issues/detail?id=2559
I want to update the rewrite rule. So GemStone only has #ifNil: with
zero arguments?
Lukas
>
> Dale
>
> Dale Henrichs wrote:
>>
>> Lukas,
>>
>> The senders (using the non-portable variant with unary block arg) are all
>> in Pier-Security-lr.165.
>>
>> Dale
>>
>> Lukas Renggli wrote:
>>>
>>> I don't see any senders in my image.
>>>
>>> Actually #ifNotNil: is accepted by Slime, the rewrite rules we follow are
>>> these:
>>>
>>> self rewriteRule
>>> replace: '``@boolean ifNotNilDo: ``@block'
>>> with: '``@boolean ifNotNil: ``@block';
>>> replace: '``@boolean ifNotNilDo: ``@block1 ifNil:
>>> ``@block2'
>>> with: '``@boolean ifNotNil: ``@block1 ifNil:
>>> ``@block2';
>>> replace: '``@boolean ifNil: ``@block1 ifNotNilDo:
>>> ``@block2'
>>> with: '``@boolean ifNil: ``@block1 ifNotNil:
>>> ``@block2';
>>> replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]'
>>> with: '``@boolean ifNotNil: [ :arg | | `@temps |
>>> ``@.body ]';
>>> replace: '``@boolean ifNotNil: [ | `@temps | ``@.body ]
>>> ifNil: ``@block '
>>> with: '``@boolean ifNotNil: [ :arg | | `@temps |
>>> ``@.body ] ifNil: ``@block';
>>> replace: '``@boolean ifNil: ``@block ifNotNil: [ | `@temps
>>> | ``@.body ]'
>>> with: '``@boolean ifNil: ``@block ifNotNil: [ :arg
>>> | | `@temps | ``@.body ]'
>>>
>>> Personally I only use #ifNil: for lazy accessors, otherwise I don't
>>> like these constructs.
>>>
>>> Lukas
>>>
>>> On 16 June 2010 21:37, Dale Henrichs <dhenrich at vmware.com> wrote:
>>>>
>>>> I'm porting to Pier2 to GemStone and ran into several places where
>>>> #ifNotNil: is being used ... what is the accepted replacement for
>>>> #ifNotNil:
>>>> ... I can clean these up as part of my port.
>>>>
>>>> Dale
>>>> _______________________________________________
>>>> Magritte, Pier and Related Tools ...
>>>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>>>>
>>>
>>>
>>
>> _______________________________________________
>> Magritte, Pier and Related Tools ...
>> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>
--
Lukas Renggli
www.lukas-renggli.ch
More information about the smallwiki
mailing list