On or about 6/2/10 11:11 AM, thus spake "Greg Parker" :
> On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote:
>> So this appears to be a technique for implementing a highly informal
>> protocol. (The technique is: define a protocol, don't bother adopting it
>> anywhere, but send messages defined in th
On or about 6/2/10 11:11 AM, thus spake "Greg Parker" :
> On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote:
>> So this appears to be a technique for implementing a highly informal
>> protocol. (The technique is: define a protocol, don't bother adopting it
>> anywhere, but send messages defined in th
On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote:
> So this appears to be a technique for implementing a highly informal
> protocol. (The technique is: define a protocol, don't bother adopting it
> anywhere, but send messages defined in that protocol to an id.)
Yep. When the compiler looks for a met
On Jun 2, 2010, at 08:57, Matt Neuburg wrote:
> So this appears to be a technique for implementing a highly informal
> protocol.
What's the problem that this technique is intended to solve?
This is one of several techniques that can be used to send an arbitrary message
to an arbitrary object wi
> This compiles and runs fine, even though MyClass never adopted the protocol
> Unadopted. It take it that by casting mc to an id, I cause the compiler to
> grasp at the only signature for "testing" that it knows about, namely the
> one in the protocol. So it happily uses that signature without co
I've used this when compiling code for both 10.6 and below to avoid
protocol errors. Seems to do the trick.
Kevin
On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote:
Here's something I stumbled on by accident. Consider the following:
// MyClass.h
#import
@interface MyClass : NSObject {
}
@e
Mostly d, but partly f. It's d in that it's well-known that you can send any
message you want to an id, but f in that the scenario you came up with is a
slightly unusual one.
Dave
On Jun 2, 2010, at 9:57 AM, Matt Neuburg wrote:
> Here's something I stumbled on by accident. Consider the follow