ifNotNil: [:arg | ]

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

ifNotNil: [:arg | ]

Ken Treis
Hi All,

I think it's great that ifNotNil: can take an argument now (as of GLASS 1.0-beta8.5). I wanted the other variants (#ifNil:ifNotNil: and vice versa) worked the same way; so I did the trivial implementation and saved the Squeak package as Squeak-KenTreis.255. Now this works:

        event target
                ifNil: [ html paragraph: 'No target has been set.' ]
                ifNotNil: [:target | html paragraph: target ]

--
Ken Treis
Miriam Technologies, Inc.

Reply | Threaded
Open this post in threaded view
|

Re: ifNotNil: [:arg | ]

Dale Henrichs
On 04/18/2011 04:57 PM, Ken Treis wrote:

> Hi All,
>
> I think it's great that ifNotNil: can take an argument now (as of GLASS 1.0-beta8.5). I wanted the other variants (#ifNil:ifNotNil: and vice versa) worked the same way; so I did the trivial implementation and saved the Squeak package as Squeak-KenTreis.255. Now this works:
>
> event target
> ifNil: [ html paragraph: 'No target has been set.' ]
> ifNotNil: [:target | html paragraph: target ]
>
> --
> Ken Treis
> Miriam Technologies, Inc.
>

Excellent ... I should pick this one up in the next GLASS release ...

Dale
Reply | Threaded
Open this post in threaded view
|

#cull: (Re: ifNotNil: [:arg | ])

Tobias Pape

Am 2011-04-19 um 02:21 schrieb Dale Henrichs:

> On 04/18/2011 04:57 PM, Ken Treis wrote:
>> Hi All,
>>
>> I think it's great that ifNotNil: can take an argument now (as of GLASS 1.0-beta8.5). I wanted the other variants (#ifNil:ifNotNil: and vice versa) worked the same way; so I did the trivial implementation and saved the Squeak package as Squeak-KenTreis.255. Now this works:
>>
>> event target
>> ifNil: [ html paragraph: 'No target has been set.' ]
>> ifNotNil: [:target | html paragraph: target ]
>>
>> --
>> Ken Treis
>> Miriam Technologies, Inc.
>>
>
> Excellent ... I should pick this one up in the next GLASS release ...

Where we at it,
what about adding the #cull: protocoll?
I would do that if y'all want.

So Long,
        -Tobias
Reply | Threaded
Open this post in threaded view
|

Re: #cull: (Re: ifNotNil: [:arg | ])

Dale Henrichs
On 04/18/2011 10:33 PM, Tobias Pape wrote:

>
> Am 2011-04-19 um 02:21 schrieb Dale Henrichs:
>
>> On 04/18/2011 04:57 PM, Ken Treis wrote:
>>> Hi All,
>>>
>>> I think it's great that ifNotNil: can take an argument now (as of GLASS 1.0-beta8.5). I wanted the other variants (#ifNil:ifNotNil: and vice versa) worked the same way; so I did the trivial implementation and saved the Squeak package as Squeak-KenTreis.255. Now this works:
>>>
>>> event target
>>> ifNil: [ html paragraph: 'No target has been set.' ]
>>> ifNotNil: [:target | html paragraph: target ]
>>>
>>> --
>>> Ken Treis
>>> Miriam Technologies, Inc.
>>>
>>
>> Excellent ... I should pick this one up in the next GLASS release ...
>
> Where we at it,
> what about adding the #cull: protocoll?
> I would do that if y'all want.
>
> So Long,
> -Tobias

I did add the cull: protocol, but I didn't implement all of the IfNil:
variants ....

Dale

Reply | Threaded
Open this post in threaded view
|

Re: #cull: (Re: ifNotNil: [:arg | ])

Tobias Pape
>> […]
>> Where we at it,
>> what about adding the #cull: protocoll?
>> I would do that if y'all want.
>>
>> So Long,
>> -Tobias
>
> I did add the cull: protocol, but I didn't implement all of the IfNil: variants ....
>

Shame on me. In which version is this available?

So Long,
        -tobias

Reply | Threaded
Open this post in threaded view
|

Re: #cull: (Re: ifNotNil: [:arg | ])

Dale Henrichs
On 04/19/2011 08:31 AM, Tobias Pape wrote:

>>> […]
>>> Where we at it,
>>> what about adding the #cull: protocoll?
>>> I would do that if y'all want.
>>>
>>> So Long,
>>> -Tobias
>>
>> I did add the cull: protocol, but I didn't implement all of the IfNil: variants ....
>>
>
> Shame on me. In which version is this available?
>
> So Long,
> -tobias
>

GLASS 1.0-beta.8.5...

Dale