On 15.12.2012, at 01:44, Uli Kusterer wrote:
>
> On 15.12.2012, at 01:38, Uli Kusterer wrote:
>
>> On 12.12.2012, at 10:03, Andreas Grosam wrote:
>>> How can I check at runtime whether an object (id) is actually a block, and
>>> not another kind of object?
>>
>> Not a good idea. What are yo
On 15.12.2012, at 01:38, Uli Kusterer wrote:
> On 12.12.2012, at 10:03, Andreas Grosam wrote:
>> How can I check at runtime whether an object (id) is actually a block, and
>> not another kind of object?
>
> Not a good idea. What are you really trying to do? Here's a few common cases
> and su
On 12.12.2012, at 10:03, Andreas Grosam wrote:
> How can I check at runtime whether an object (id) is actually a block, and
> not another kind of object?
Not a good idea. What are you really trying to do? Here's a few common cases
and suggestions on how to do it better, and why:
1) Serializin
On Dec 12, 2012, at 5:24 AM, Andreas Grosam wrote:
> And, it can be a block as well, where the block is responsible to feed the
> consumer (the id) with data when it has bytes
> available when the request is active.
> You can do this with the same method, same API. Well, it MUST, otherwise the
On 12 Dec 2012, at 14:14, Jean Suisse wrote:
> On 12 déc. 2012, at 13:02, Mike Abdullah wrote:
>
>> Why does your code care if some unknown object is a block? This is a strong
>> sign of a bad design.
>
>
> As far as I am concerned, I can think of at least two or three legitimate
> reasons
On 12 déc. 2012, at 13:02, Mike Abdullah wrote:
> Why does your code care if some unknown object is a block? This is a strong
> sign of a bad design.
As far as I am concerned, I can think of at least two or three legitimate
reasons to care wether an unidentified object is a block or not.
But
On 12 Dec 2012, at 13:24, Andreas Grosam wrote:
>
> On 12.12.2012, at 13:02, Mike Abdullah wrote:
>
>>
>> On 12 Dec 2012, at 09:57, Andreas Grosam wrote:
>>
>> Why does your code care if some unknown object is a block? This is a strong
>> sign of a bad design.
>
> Oh, then a lot of common C
On 12.12.2012, at 13:02, Mike Abdullah wrote:
>
> On 12 Dec 2012, at 09:57, Andreas Grosam wrote:
>
> Why does your code care if some unknown object is a block? This is a strong
> sign of a bad design.
Oh, then a lot of common Cocoa patters like dug typing and the usage
-respondsToSelector:,
On 12 Dec 2012, at 09:57, Andreas Grosam wrote:
>
> On 12.12.2012, at 10:19, Charles Srstka wrote:
>
>> On Dec 12, 2012, at 3:03 AM, Andreas Grosam wrote:
>>
>>> How can I check at runtime whether an object (id) is actually a block, and
>>> not another kind of object?
>>
>> I don't think th
On Dec 12, 2012, at 6:36 AM, jonat...@mugginsoft.com wrote:
> On 12 Dec 2012, at 09:57, Andreas Grosam wrote:
>> On 12.12.2012, at 10:19, Charles Srstka wrote:
>>> On Dec 12, 2012, at 3:03 AM, Andreas Grosam wrote:
>>>
How can I check at runtime whether an object (id) is actually a block, a
On 12.12.2012, at 12:36, jonat...@mugginsoft.com wrote:
> You could perhaps make this a little less fragile.
>
>typedef void (^MyBlockType)(void);
>
>// we know this is a block
>void (^isaBlock)(void) = ^(void) {};
>
>MyBlockType aBlock = ^(void) {NSLog(@"I am a block");};
>
>
On 12 Dec 2012, at 09:57, Andreas Grosam wrote:
>
> On 12.12.2012, at 10:19, Charles Srstka wrote:
>
>> On Dec 12, 2012, at 3:03 AM, Andreas Grosam wrote:
>>
>>> How can I check at runtime whether an object (id) is actually a block, and
>>> not another kind of object?
>>
>> I don't think t
On 12.12.2012, at 10:19, Charles Srstka wrote:
> On Dec 12, 2012, at 3:03 AM, Andreas Grosam wrote:
>
>> How can I check at runtime whether an object (id) is actually a block, and
>> not another kind of object?
>
> I don't think there's any good way of doing that right now. You could check
>
On Dec 12, 2012, at 3:03 AM, Andreas Grosam wrote:
> How can I check at runtime whether an object (id) is actually a block, and
> not another kind of object?
I don't think there's any good way of doing that right now. You could check the
class of the block, but since the block classes are comp
How can I check at runtime whether an object (id) is actually a block, and not
another kind of object?
Andreas
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
15 matches
Mail list logo